This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]