Writing a custom LLVM IR generator