RSSA backend
Stephen Weeks
MLton@sourcelight.com
Thu, 17 Jan 2002 11:04:28 -0800
> I also made CReturn and Runtime kinds liveNoFormals. The key is that the
> x86 codegen thinks of liveness as being a property of labels, which occur
> before "arguments". So, with a CReturn, the destination operand (if any)
> is not live at the label; it becomes live after the label when we assign
> to it. What is live (implicitly) is a temporary location holding the
> return result (which, in turn, is never really used because all CReturns
> become fall thus in code layout and moves all occur in place).
Fine. It won't matter for Runtime since those are always nullary.
But I agree that liveNoFormals makes more sense.
> That solves most of the pseudo-register discrepencies between MACHINE and
> X86 versions of liveness. The main remaining one are the selects down a
> value carrying branch of a case statement that aren't used; e.g.:
...
> Anyways, I guess this isn't really a "problem" with MACHINE, because the
> liveness is correct for the given program. It's only after some
> optimization that the liveness changes. But, it might be worth running a
> quick remove unused equivalent on RSSA to eliminate these.
Agreed. We need to think hard about how much we can share between
RSSA and SSA so we can avoid duplicating the whole optimization
infrastructure.
> 4. make the array initialization loops explicit in MACHINE; I guess this
> would be an insertArrayInitializations after insertSignalChecks
>
> I think we eventually want 4, which solves all the problems at once.
Agreed. I will do it right now. It should be easy.