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]
Other format: [Raw text]

Re: Sibcalls and exceptions


On Nov 26, 2001, law@redhat.com wrote:

> But what I don't understand is how we're tripping over this in the first
> place -- a call which might throw should have two edges -- one to the 
> exception handler, one to the next block.  That should have prevented the
> sibcall optimization from applying in the first place.

Perhaps it didn't prevent it back then, and now it does?  I don't
know, the case I was looking at was not suitable for sibcall
optimization anyway.  The problem I found was that one of the
arguments' trees was a complex STMT_EXPR containing gotos and stuff,
so it had to be evalled only once, and its evaluation was put only in
the sibcall RTL fragment, so it ended up being discarded.  That was in
GCC code that didn't have the lang hook to mark STMT_EXPR as highly
unsafe for re-evaluation.  We do handle this correctly now.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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