Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / Contify.adoc
CommitLineData
7f918cf1
CE
1Contify
2=======
3
4<:Contify:> is an optimization pass for the <:SSA:>
5<:IntermediateLanguage:>, invoked from <:SSASimplify:>.
6
7== Description ==
8
9Contification is a compiler optimization that turns a function that
10always returns to the same place into a continuation. This exposes
11control-flow information that is required by many optimizations,
12including traditional loop optimizations.
13
14== Implementation ==
15
16* <!ViewGitFile(mlton,master,mlton/ssa/contify.fun)>
17
18== Details and Notes ==
19
20See <!Cite(FluetWeeks01, Contification Using Dominators)>. The
21intermediate language described in that paper has since evolved to the
22<:SSA:> <:IntermediateLanguage:>; hence, the complication described in
23Section 6.1 is no longer relevant.