[PATCH] Fix sibcall related failure in g++.old-deja/g++.other/eh1.C

Jakub Jelinek jakub@redhat.com
Fri Jun 16 09:28:00 GMT 2000


On Fri, Jun 16, 2000 at 05:25:19PM +0100, Nathan Sidwell wrote:
> Mark Mitchell wrote:
> >   +      while (NEXT_INSN (insn));
> > 
> > That's a loop that's going to take either 0, or an infinite, number of
> > trips, unless I'm losing it. :-)
> No, but I had to look very carefully to see what it was doing too.
> 
> FWIW, I'd have written it as,
> if (insn)
>   {
>     tree probe;
>     
>     while ((probe = NEXT_INSN (insn)))
>       insn = probe;
>     set_last_insn (insn);
>   }
> 
> Which, I find clearer. (maybe a != NULL_TREE should be put in there
> for good measure too ...

I wanted to optimize for the common case (ie. insn != NULL_RTX, NEXT_INSN
(insn) == NULL_RTX) and avoid calling set_last_insn in that case.
But I'm of course open to changing it to be more readable.

	Jakub


More information about the Gcc-patches mailing list