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