4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
30 <div class="sectionbody">
31 <div class="paragraph"><p><a href="Contify">Contify</a> is an optimization pass for the <a href="SSA">SSA</a>
32 <a href="IntermediateLanguage">IntermediateLanguage</a>, invoked from <a href="SSASimplify">SSASimplify</a>.</p></div>
36 <h2 id="_description">Description</h2>
37 <div class="sectionbody">
38 <div class="paragraph"><p>Contification is a compiler optimization that turns a function that
39 always returns to the same place into a continuation. This exposes
40 control-flow information that is required by many optimizations,
41 including traditional loop optimizations.</p></div>
45 <h2 id="_implementation">Implementation</h2>
46 <div class="sectionbody">
47 <div class="ulist"><ul>
50 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/contify.fun"><span class="monospaced">contify.fun</span></a>
57 <h2 id="_details_and_notes">Details and Notes</h2>
58 <div class="sectionbody">
59 <div class="paragraph"><p>See <a href="References#FluetWeeks01"> Contification Using Dominators</a>. The
60 intermediate language described in that paper has since evolved to the
61 <a href="SSA">SSA</a> <a href="IntermediateLanguage">IntermediateLanguage</a>; hence, the complication described in
62 Section 6.1 is no longer relevant.</p></div>
66 <div id="footnotes"><hr></div>
68 <div id="footer-text">
70 <div id="footer-badges">