new SSA IL (fwd)

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Fri, 21 Sep 2001 15:33:05 -0400 (EDT)


On Fri, 21 Sep 2001, Henry Cejtin wrote:

> Weren't we going to migrate to something that let us have mutually recursive
> continuations?  Does the SSA form give us this?

Yes.  Here's what I said about it about a month ago:

---------- Forwarded message ----------
Date: Tue, 7 Aug 2001 22:26:16 -0700 (PDT)
From: Matthew Fluet <mfluet@intertrust.com>
To: MLton@sourcelight.com
Subject: RE: new SSA IL


> Just curious: how much of the simplication comes from the mutual recursion and
> how much from the un-scoped?

With mutual recursion, we can drop the whole analysis of nesting -- and
not have to do an additional check to verify that the transformation could
take place (i.e., whether or not a CPS function that should be contified
needs to remain a CPS function).  However, we still need to insert
contified functions immediately after the declaration of the continuation
to which they return.  That's the messiness in the rewrite case for
let { cont ki(xis) = ei | i \in I} in e end
from the paper.

With un-scoped, we can just accumulate all of the functions that are
contified in the CPS function (some of which return to the CPS function
and some of which return to particular continuations in the CPS function)
and tack them onto the block list.