Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / SSASimplify.adoc
CommitLineData
7f918cf1
CE
1SSASimplify
2===========
3
4The optimization passes for the <:SSA:> <:IntermediateLanguage:> are
5collected and controlled by the `Simplify` functor
6(<!ViewGitFile(mlton,master,mlton/ssa/simplify.sig)>,
7<!ViewGitFile(mlton,master,mlton/ssa/simplify.fun)>).
8
9The following optimization passes are implemented:
10
11* <:CombineConversions:>
12* <:CommonArg:>
13* <:CommonBlock:>
14* <:CommonSubexp:>
15* <:ConstantPropagation:>
16* <:Contify:>
17* <:Flatten:>
18* <:Inline:>
19* <:IntroduceLoops:>
20* <:KnownCase:>
21* <:LocalFlatten:>
22* <:LocalRef:>
23* <:LoopInvariant:>
24* <:LoopUnfoll:>
25* <:LoopUnswitch:>
26* <:Redundant:>
27* <:RedundantTests:>
28* <:RemoveUnused:>
29* <:ShareZeroVec:>
30* <:SimplifyTypes:>
31* <:Useless:>
32
33The following implementation passes are implemented:
34
35* <:PolyEqual:>
36* <:PolyHash:>
37
38There are additional analysis and rewrite passes that augment many of the other optimization passes:
39
40* <:Multi:>
41* <:Restore:>
42* <:Shrink:>
43
44The optimization passes can be controlled from the command-line by the options:
45
46* `-diag-pass <pass>` -- keep diagnostic info for pass
47* `-disable-pass <pass>` -- skip optimization pass (if normally performed)
48* `-enable-pass <pass>` -- perform optimization pass (if normally skipped)
49* `-keep-pass <pass>` -- keep the results of pass
50* `-loop-passes <n>` -- loop optimization passes
51* `-ssa-passes <passes>` -- ssa optimization passes