Refactored LLVM IR codegen