CSE

Matthew Fluet fluet@CS.Cornell.EDU
Sun, 28 Oct 2001 08:47:12 -0500 (EST)


Checked in a port of CSE from CPS to SSA:

Simple port of CommonSubexp from CPS to SSA.

As it currently stands, the SSA CSE pass is less powerful than it's
CPS counterpart, because CSE only tracks Exp.t's and a lot of integer
arithmetic is now caught up in Transfer.Prim's.  I think that what is
currently missing is a way of recognizing when the success branch of a
Transfer.Prim has the Transfer.Prim as it's unique predecessor.  In
that case, then we can assume that the formal of the success branch
contains the result of the arithmetic and we can use it to eliminate
future Transfer.Prim's.  Seems like you could do the same thing with
Transfer.Goto's that are the unique predecessor of their destination
(but, most likely, those are all eliminated by the shinker anyways, so
they don't really exist in practice).