= RemoveUnused

<<RemoveUnused#>> is an optimization pass for both the <<SSA#>> and
<<SSA2#>> <<IntermediateLanguage#>>s, invoked from <<SSASimplify#>> and
<<SSA2Simplify#>>.

== Description

This pass aggressively removes unused:

* datatypes
* datatype constructors
* datatype constructor arguments
* functions
* function arguments
* function returns
* blocks
* block arguments
* statements (variable bindings)
* handlers from non-tail calls (mayRaise analysis)
* continuations from non-tail calls (mayReturn analysis)

== Implementation

* https://github.com/MLton/mlton/blob/master/mlton/ssa/remove-unused.fun[`remove-unused.fun`]
* https://github.com/MLton/mlton/blob/master/mlton/ssa/remove-unused2.fun[`remove-unused2.fun`]

== Details and Notes

{empty}
