= LLVMCodegen The <> is a <> that translates the <> <> to <> assembly, which is further optimized and compiled to native object code by the <> toolchain. In benchmarks performed on the <> architecture, code size with this generator is usually slightly smaller than either the <> or the <> code generators. Compile time is worse than <>, but slightly better than <>. Run time is often better than either <> or <>. The <> works by generating text LLVM IR (`.ll` files) and compiling it to object code (`.o` files) using the LLVM command-line tools: `llvm-as` (`.ll` to `.bc` assembler), `opt` (`.bc` to `.bc` optimizer), and `llc` (`.bc` to `.o` system compiler). The `-llvm-as `, `-llvm-opt `, and `-llvm-llc ` <> can be used to specify the executables to be used when invoking the LLVM command-line tools, which can be used to select a specific version of the LLVM command-line tools (e.g., `-llvm-as llvm-as-14 -llvm-opt opt-14 -llvm-llc llc-14`). <> requires LLVM 13 or 14, as it invokes `opt` using the https://releases.llvm.org/14.0.0/docs/ReleaseNotes.html#changes-to-the-llvm-ir:["legacy pass manager"]. As of 20230522, MLton requires LLVM 14, as it invokes `opt` using the https://releases.llvm.org/14.0.0/docs/ReleaseNotes.html#changes-to-the-llvm-ir:["new pass manager"]. As of 20240809, MLton requires LLVM 15, as it generates LLVM IR using https://releases.llvm.org/15.0.0/docs/ReleaseNotes.html#changes-to-the-llvm-ir:["opaque pointers"]. == Implementation * https://github.com/MLton/mlton/blob/master/mlton/codegen/llvm-codegen/llvm-codegen.sig[`llvm-codegen.sig`] * https://github.com/MLton/mlton/blob/master/mlton/codegen/llvm-codegen/llvm-codegen.fun[`llvm-codegen.fun`] == Details and Notes The <> was initially developed by Brian Leibig (see <>).