Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / doc / guide / localhost / LLVMCodegen
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>LLVMCodegen</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>LLVMCodegen</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>The <a href="LLVMCodegen">LLVMCodegen</a> is a <a href="Codegen">code generator</a> that translates the
32 <a href="Machine">Machine</a> <a href="IntermediateLanguage">IntermediateLanguage</a> to <a href="LLVM">LLVM</a> assembly, which is
33 further optimized and compiled to native object code by the <a href="LLVM">LLVM</a>
34 toolchain.</p></div>
35 <div class="paragraph"><p>It requires <a href="LLVM">LLVM</a> version 3.7 or greater to be installed.</p></div>
36 <div class="paragraph"><p>In benchmarks performed on the <a href="RunningOnAMD64">AMD64</a> architecture,
37 code size with this generator is usually slightly smaller than either
38 the <a href="AMD64Codegen">native</a> or the <a href="CCodegen">C</a> code generators. Compile
39 time is worse than <a href="AMD64Codegen">native</a>, but slightly better than
40 <a href="CCodegen">C</a>. Run time is often better than either <a href="AMD64Codegen">native</a>
41 or <a href="CCodegen">C</a>.</p></div>
42 </div>
43 </div>
44 <div class="sect1">
45 <h2 id="_implementation">Implementation</h2>
46 <div class="sectionbody">
47 <div class="ulist"><ul>
48 <li>
49 <p>
50 <a href="https://github.com/MLton/mlton/blob/master/mlton/codegen/llvm-codegen/llvm-codegen.sig"><span class="monospaced">llvm-codegen.sig</span></a>
51 </p>
52 </li>
53 <li>
54 <p>
55 <a href="https://github.com/MLton/mlton/blob/master/mlton/codegen/llvm-codegen/llvm-codegen.fun"><span class="monospaced">llvm-codegen.fun</span></a>
56 </p>
57 </li>
58 </ul></div>
59 </div>
60 </div>
61 <div class="sect1">
62 <h2 id="_details_and_notes">Details and Notes</h2>
63 <div class="sectionbody">
64 <div class="paragraph"><p>The <a href="LLVMCodegen">LLVMCodegen</a> was initially developed by Brian Leibig (see
65 <a href="References#Leibig13">An LLVM Back-end for MLton</a>).</p></div>
66 </div>
67 </div>
68 </div>
69 <div id="footnotes"><hr></div>
70 <div id="footer">
71 <div id="footer-text">
72 </div>
73 <div id="footer-badges">
74 </div>
75 </div>
76 </body>
77 </html>