Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / CompilerOverview.adoc
1 CompilerOverview
2 ================
3
4 The following table shows the overall structure of the compiler.
5 <:IntermediateLanguage:>s are shown in the center column. The names
6 of compiler passes are listed in the left and right columns.
7
8 [align="center",witdth="50%",cols="^,^,^"]
9 |====
10 3+^| *Compiler Overview*
11 | _Translation Passes_ | _<:IntermediateLanguage:>_ | _Optimization Passes_
12 | | Source |
13 | <:FrontEnd:> | |
14 | | <:AST:> |
15 | <:Elaborate:> | |
16 | | <:CoreML:> | <:CoreMLSimplify:>
17 | <:Defunctorize:> | |
18 | | <:XML:> | <:XMLSimplify:>
19 | <:Monomorphise:> | |
20 | | <:SXML:> | <:SXMLSimplify:>
21 | <:ClosureConvert:> | |
22 | | <:SSA:> | <:SSASimplify:>
23 | <:ToSSA2:> | |
24 | | <:SSA2:> | <:SSA2Simplify:>
25 | <:ToRSSA:> | |
26 | | <:RSSA:> | <:RSSASimplify:>
27 | <:ToMachine:> | |
28 | | <:Machine:> |
29 | <:Codegen:> | |
30 |====
31
32 The `Compile` functor (<!ViewGitFile(mlton,master,mlton/main/compile.sig)>,
33 <!ViewGitFile(mlton,master,mlton/main/compile.fun)>), controls the
34 high-level view of the compiler passes, from <:FrontEnd:> to code
35 generation.