new SSA IL
Stephen Weeks
MLton@sourcelight.com
Tue, 7 Aug 2001 21:31:27 -0700
> If goto's pass arguments, is their semantics assignment to the argument?
> I.e., I am in a `function', x is in scope (it is the piece of the list I am
> working on), I call myself with the tail of x as an arguemnt. Thus you
> really do have mutation of variables, right?
Yes. But only in the same sense as "i" being mutated in
fun f i = if i = 13 then () else f (i + 1)
It really is SSA (there is one *static* place at which a variable is assigned),
except that we write goto's that pass arguments instead of collecting everything
in a phi-function at the destination.
> I'm surprised that you say that the dominator condition could be done in the
> current world by rewriting the syntax tree. This wouldn't be possible if it
> was a matter of blocks not nesting I would think.
Take the dominator tree of the control-flow graph. The root node is the main
expressions. Nest all children of the root immediately within this expression
(this ignores mutual recursion between those children). Recur on each child.
> Re the hackers guide, I would love to start hacking, but would need the
> hackers guide to begin. (Enough moaning from me.)
For you, I am willing to write some stuff. What do you need? Overview? CPS
semantics?