This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Sibcalls and exceptions
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: law at redhat dot com
- Cc: Mark Mitchell <mark at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 26 Nov 2001 15:05:44 -0200
- Subject: Re: Sibcalls and exceptions
- Organization: GCC Team, Red Hat
- References: <14280.1006785603@porcupine.cygnus.com>
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