4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>RemoveUnused</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><a href="RemoveUnused">RemoveUnused</a> is an optimization pass for both the <a href="SSA">SSA</a> and
32 <a href="SSA2">SSA2</a> <a href="IntermediateLanguage">IntermediateLanguage</a>s, invoked from <a href="SSASimplify">SSASimplify</a> and
33 <a href="SSA2Simplify">SSA2Simplify</a>.</p></div>
37 <h2 id="_description">Description</h2>
38 <div class="sectionbody">
39 <div class="paragraph"><p>This pass aggressively removes unused:</p></div>
40 <div class="ulist"><ul>
53 datatype constructor arguments
83 statements (variable bindings)
88 handlers from non-tail calls (mayRaise analysis)
93 continuations from non-tail calls (mayReturn analysis)
100 <h2 id="_implementation">Implementation</h2>
101 <div class="sectionbody">
102 <div class="ulist"><ul>
105 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/remove-unused.fun"><span class="monospaced">remove-unused.fun</span></a>
110 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/remove-unused2.fun"><span class="monospaced">remove-unused2.fun</span></a>
117 <h2 id="_details_and_notes">Details and Notes</h2>
118 <div class="sectionbody">
119 <div class="paragraph"><p></p></div>
123 <div id="footnotes"><hr></div>
125 <div id="footer-text">
127 <div id="footer-badges">