Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / RemoveUnused.adoc
1 RemoveUnused
2 ============
3
4 <:RemoveUnused:> is an optimization pass for both the <:SSA:> and
5 <:SSA2:> <:IntermediateLanguage:>s, invoked from <:SSASimplify:> and
6 <:SSA2Simplify:>.
7
8 == Description ==
9
10 This pass aggressively removes unused:
11
12 * datatypes
13 * datatype constructors
14 * datatype constructor arguments
15 * functions
16 * function arguments
17 * function returns
18 * blocks
19 * block arguments
20 * statements (variable bindings)
21 * handlers from non-tail calls (mayRaise analysis)
22 * continuations from non-tail calls (mayReturn analysis)
23
24 == Implementation ==
25
26 * <!ViewGitFile(mlton,master,mlton/ssa/remove-unused.fun)>
27 * <!ViewGitFile(mlton,master,mlton/ssa/remove-unused2.fun)>
28
29 == Details and Notes ==
30
31 {empty}