[MLton] SSA vs SSA2

Stephen Weeks MLton@mlton.org
Sun, 20 Nov 2005 20:14:35 -0800


> the advantage of SSA over SSA2 is that the default is immutability.
> And most optimizations, like loop-invariant code motion, are only
> sound for immutable types/values.  It's relatively easy to check for
> Ref/Array prims and ref/array types in SSA, while in SSA2, any
> possible component could be mutable.  

I don't see a significant difference.  There is are mutable constructs
in each IL, and which must be treated correctly by an optimization.

> (Witness the recent shrinker bug.)

That came from translating code written for SSA to SSA2, where the
meaning of language constructs changed.  I don't think it's indicative
of problems for new passes.