Avoid messing up of loop notes

Jan Hubicka jh@suse.cz
Tue Jul 24 11:52:00 GMT 2001


> On Mon, Jul 23, 2001 at 02:37:54PM +0200, Jan Hubicka wrote:
> > +   if (bb1->index > bb2->index)
> > +     return false;
> > +   for (insn = bb1->end; insn != bb2->head && count >= 0;
> > +        insn = NEXT_INSN (insn))
> 
> Um, how can this work?  BB1 is after BB2, yet we're
> trying to step *forward* from BB1 to BB2?
I now see where your confusion came from.
Originally my function whas named differently, but now it says
it tests for loopback edge. That edge is bb2->bb1, so it is
truely confusing.

Would it be OK to swap the arguments before installing the patch?

Honza
> 
> 
> r~



More information about the Gcc-patches mailing list