SSA IL
Matthew Fluet
Matthew Fluet <fluet@CS.Cornell.EDU>
Tue, 9 Oct 2001 19:14:51 -0400 (EDT)
> > Is there a particular reason why the set of SSA functions is a list rather
> > than a vector?
>
> Yes. Space safety. Because when translating from one program to another, one
> function at a time, Vector.map and Vector.fold keep alive the whole vector,
> while the corresponding List functions only keep alive the tail. That space
> leak can hurt on big programs.
Ahh...that makes sense.
I'm just about done with removeUnused. A few semanitcs questions:
1. in the CPS version, we don't selectively include Dec.Bind's depending
on the VarInfo.t of the var; seems that the only thing affected by the
VarInfo.t's are globals -- maybe that's correct; unused Dec.Bind's are
dead code, and eliminated by shrinks; but globals aren't eliminated by
shrink.
2. when should I visit a handler? At a setHandler or at a use of a
handler at a non-tail call? I think the latter; the use of a handler at a
non-tail call should be dominated by a setHandler of the handler; but we
can always setHandlers that aren't ever used; something (shrinker?) should
delete setHandler's for labels that don't have any corresponding non-tail
calls.