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