4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>SSASimplify</title>
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>The optimization passes for the <a href="SSA">SSA</a> <a href="IntermediateLanguage">IntermediateLanguage</a> are
32 collected and controlled by the <span class="monospaced">Simplify</span> functor
33 (<a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/simplify.sig"><span class="monospaced">simplify.sig</span></a>,
34 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/simplify.fun"><span class="monospaced">simplify.fun</span></a>).</p></div>
35 <div class="paragraph"><p>The following optimization passes are implemented:</p></div>
36 <div class="ulist"><ul>
39 <a href="CombineConversions">CombineConversions</a>
44 <a href="CommonArg">CommonArg</a>
49 <a href="CommonBlock">CommonBlock</a>
54 <a href="CommonSubexp">CommonSubexp</a>
59 <a href="ConstantPropagation">ConstantPropagation</a>
64 <a href="Contify">Contify</a>
69 <a href="Flatten">Flatten</a>
74 <a href="Inline">Inline</a>
79 <a href="IntroduceLoops">IntroduceLoops</a>
84 <a href="KnownCase">KnownCase</a>
89 <a href="LocalFlatten">LocalFlatten</a>
94 <a href="LocalRef">LocalRef</a>
99 <a href="LoopInvariant">LoopInvariant</a>
104 <a href="LoopUnfoll">LoopUnfoll</a>
109 <a href="LoopUnswitch">LoopUnswitch</a>
114 <a href="Redundant">Redundant</a>
119 <a href="RedundantTests">RedundantTests</a>
124 <a href="RemoveUnused">RemoveUnused</a>
129 <a href="ShareZeroVec">ShareZeroVec</a>
134 <a href="SimplifyTypes">SimplifyTypes</a>
139 <a href="Useless">Useless</a>
143 <div class="paragraph"><p>The following implementation passes are implemented:</p></div>
144 <div class="ulist"><ul>
147 <a href="PolyEqual">PolyEqual</a>
152 <a href="PolyHash">PolyHash</a>
156 <div class="paragraph"><p>There are additional analysis and rewrite passes that augment many of the other optimization passes:</p></div>
157 <div class="ulist"><ul>
160 <a href="Multi">Multi</a>
165 <a href="Restore">Restore</a>
170 <a href="Shrink">Shrink</a>
174 <div class="paragraph"><p>The optimization passes can be controlled from the command-line by the options:</p></div>
175 <div class="ulist"><ul>
178 <span class="monospaced">-diag-pass <pass></span> — keep diagnostic info for pass
183 <span class="monospaced">-disable-pass <pass></span> — skip optimization pass (if normally performed)
188 <span class="monospaced">-enable-pass <pass></span> — perform optimization pass (if normally skipped)
193 <span class="monospaced">-keep-pass <pass></span> — keep the results of pass
198 <span class="monospaced">-loop-passes <n></span> — loop optimization passes
203 <span class="monospaced">-ssa-passes <passes></span> — ssa optimization passes
210 <div id="footnotes"><hr></div>
212 <div id="footer-text">
214 <div id="footer-badges">