<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>SSASimplify</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>SSASimplify</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>The optimization passes for the <a href="SSA">SSA</a> <a href="IntermediateLanguage">IntermediateLanguage</a> are
collected and controlled by the <span class="monospaced">Simplify</span> functor
(<a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/simplify.sig"><span class="monospaced">simplify.sig</span></a>,
<a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/simplify.fun"><span class="monospaced">simplify.fun</span></a>).</p></div>
<div class="paragraph"><p>The following optimization passes are implemented:</p></div>
<div class="ulist"><ul>
<li>
<p>
<a href="CombineConversions">CombineConversions</a>
</p>
</li>
<li>
<p>
<a href="CommonArg">CommonArg</a>
</p>
</li>
<li>
<p>
<a href="CommonBlock">CommonBlock</a>
</p>
</li>
<li>
<p>
<a href="CommonSubexp">CommonSubexp</a>
</p>
</li>
<li>
<p>
<a href="ConstantPropagation">ConstantPropagation</a>
</p>
</li>
<li>
<p>
<a href="Contify">Contify</a>
</p>
</li>
<li>
<p>
<a href="Flatten">Flatten</a>
</p>
</li>
<li>
<p>
<a href="Inline">Inline</a>
</p>
</li>
<li>
<p>
<a href="IntroduceLoops">IntroduceLoops</a>
</p>
</li>
<li>
<p>
<a href="KnownCase">KnownCase</a>
</p>
</li>
<li>
<p>
<a href="LocalFlatten">LocalFlatten</a>
</p>
</li>
<li>
<p>
<a href="LocalRef">LocalRef</a>
</p>
</li>
<li>
<p>
<a href="LoopInvariant">LoopInvariant</a>
</p>
</li>
<li>
<p>
<a href="Redundant">Redundant</a>
</p>
</li>
<li>
<p>
<a href="RedundantTests">RedundantTests</a>
</p>
</li>
<li>
<p>
<a href="RemoveUnused">RemoveUnused</a>
</p>
</li>
<li>
<p>
<a href="SimplifyTypes">SimplifyTypes</a>
</p>
</li>
<li>
<p>
<a href="Useless">Useless</a>
</p>
</li>
</ul></div>
<div class="paragraph"><p>The following implementation passes are implemented:</p></div>
<div class="ulist"><ul>
<li>
<p>
<a href="PolyEqual">PolyEqual</a>
</p>
</li>
<li>
<p>
<a href="PolyHash">PolyHash</a>
</p>
</li>
</ul></div>
<div class="paragraph"><p>There are additional analysis and rewrite passes that augment many of the other optimization passes:</p></div>
<div class="ulist"><ul>
<li>
<p>
<a href="Multi">Multi</a>
</p>
</li>
<li>
<p>
<a href="Restore">Restore</a>
</p>
</li>
<li>
<p>
<a href="Shrink">Shrink</a>
</p>
</li>
</ul></div>
<div class="paragraph"><p>The optimization passes can be controlled from the command-line by the options:</p></div>
<div class="ulist"><ul>
<li>
<p>
<span class="monospaced">-diag-pass &lt;pass&gt;</span>&#8201;&#8212;&#8201;keep diagnostic info for pass
</p>
</li>
<li>
<p>
<span class="monospaced">-drop-pass &lt;pass&gt;</span>&#8201;&#8212;&#8201;omit optimization pass
</p>
</li>
<li>
<p>
<span class="monospaced">-keep-pass &lt;pass&gt;</span>&#8201;&#8212;&#8201;keep the results of pass
</p>
</li>
<li>
<p>
<span class="monospaced">-loop-passes &lt;n&gt;</span>&#8201;&#8212;&#8201;loop optimization passes
</p>
</li>
<li>
<p>
<span class="monospaced">-ssa-passes &lt;passes&gt;</span>&#8201;&#8212;&#8201;ssa optimization passes
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
