Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / LLVMCodegen.adoc
1 LLVMCodegen
2 ===========
3
4 The <:LLVMCodegen:> is a <:Codegen:code generator> that translates the
5 <:Machine:> <:IntermediateLanguage:> to <:LLVM:> assembly, which is
6 further optimized and compiled to native object code by the <:LLVM:>
7 toolchain.
8
9 It requires <:LLVM:> version 3.7 or greater to be installed.
10
11 In benchmarks performed on the <:RunningOnAMD64:AMD64> architecture,
12 code size with this generator is usually slightly smaller than either
13 the <:AMD64Codegen:native> or the <:CCodegen:C> code generators. Compile
14 time is worse than <:AMD64Codegen:native>, but slightly better than
15 <:CCodegen:C>. Run time is often better than either <:AMD64Codegen:native>
16 or <:CCodegen:C>.
17
18 == Implementation ==
19
20 * <!ViewGitFile(mlton,master,mlton/codegen/llvm-codegen/llvm-codegen.sig)>
21 * <!ViewGitFile(mlton,master,mlton/codegen/llvm-codegen/llvm-codegen.fun)>
22
23 == Details and Notes ==
24
25 The <:LLVMCodegen:> was initially developed by Brian Leibig (see
26 <!Cite(Leibig13,An LLVM Back-end for MLton)>).