CVS hackery

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Tue, 9 Oct 2001 14:19:55 -0400 (EDT)


> > I also changed control.sml to make -native true the default, but you can
> > make that modification after checking the above in to the current ssa
> > world.
> 
> Definitely.  I'll run regressions and a self compile here.  If all passes, I'll
> move the SSA stuff to the main line of development.

Sounds good.  What's the trajectory from here?  Here are a couple of
things from my "when SSA exists todo":

Machine IL (i.e., backend.fun) should pass back d0 and d1 profiling info;
this means that every d1 label corresponds to an SSA block, rather than
sometimes corresponding to a Machine IL block (handler/cont/case stubs).

known case optimization in SSA IL

loop invariant hoisting in SSA IL

translating contify, unusedArgs, and commonBlock optimizations: can
streamline to not require inner/outer

translating contify:
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 vector.


contify, unusedArgs and commonBlock are the CPS optimizations I'm most
familiar with, so I know what would be different in their translation to
SSA.  commonSubexpr (and I assume others) will probable be fairly simple,
but (just?) require a traversal of the dominator tree rather than the
lexical scope.  I don't know what happens to raise-to-jump (that's got to
be all different with the new exception model).  The shrinker probably
needs a careful translation.