limit check insertion via loop forests

Stephen Weeks MLton@sourcelight.com
Thu, 20 Dec 2001 15:38:44 -0800


> I spelled this out a little more verbosely in my previous email.  I don't
> think it's that hard.  We just need to limit what labels are thrown into L
> along with Headers.  Given your definition of "same loop" we can also
> define a notion of the allocation of a loop -- it's simply the sum of A(l)
> for all l in the same loop.  So, we define L : Label -> Loops and extend
> A to Loops in the obvious manner.
> 
> L = Headers U
>     { l | exists l' s.t. L(l) <> L(l'), A(L(l')) = 0, and l in S(l') }
> 
> i.e., add all labels that are following non-allocating loops.

Makes perfect sense.  You beat me by a minute or so :-).

BTW, as your non-minimal example shows, there is still room for
improvement in node placement.  Maybe it's time to fire off a mail to
Bob T.  But in reality, I think we'll be perfectly happy with limit
checks at entrys, headers and exits from non-allocating loops.

> B.t.w., there is one complication with Steve's represenation of loop
> forests, which is that all of the nodes that aren't in any loops are
> in the same notInLoop vector (at the top level) are effectively in the
> same loop.  Not a big deal, when setting up the equivalence classes, we
> just need to specially treat those in the top notInLoop vector.

I don't see the problem.  I think it makes sense to put all those
nodes in the same class.


I'm off for a while (maybe even the night), so don't expect any more
responses from me today.