ssa restore
Stephen Weeks
MLton@sourcelight.com
Tue, 4 Dec 2001 18:39:13 -0800
> How "broken" an ssa function should the ssa restore pass handle?
...
> The knownCase pass will probably introduce multiple let and arg bindings
> of a variable, every path through the CFG to a use of a variable will pass
> through a binding (but, no single binding dominates all uses and other
> bindings). Here's the transformation I have in mind:
...
> There are now three bindings of x, two let bindings and one arg binding.
Makes sense.
> What other kinds of optimizations do we think will be sent at the ssa
> restore? And how will they break the ssa invariants?
One other optimization that breaks SSA is loop reordering (to move the
test to the end of a loop so that the loop only has one jump). I
can't think of any others offhand.
How about this as a required property of the input to SSA restore?
Every path from the root to a use of a variable (excluding globals)
passes through a def of that variable.