This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2014 11:09:06 +0100
- Subject: Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)
- Authentication-results: sourceware.org; auth=none
- References: <20140206073732 dot GQ12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061008370 dot 29326 at zhemvz dot fhfr dot qr> <20140206092242 dot GR12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061027540 dot 29326 at zhemvz dot fhfr dot qr> <20140206094705 dot GS12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061048500 dot 29326 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 06, 2014 at 11:00:14AM +0100, Richard Biener wrote:
> Then __builtin_setjmp_setup is?
No, it never returns twice through the fallthru edge. It only
returns second time through the abnormal edge virtually to the
ABNORMAL_DISPATCHER and from that through another abnormal edge
to __builtin_setjmp_receiver. So, among other things, we don't
want abnormal edge to the start of __builtin_setjmp_setup.
Perhaps we could stop this lowering of __builtin_setjmp into
two special builtins now, but such changes look too big for me for stage4.
At expansion time we'd need to make sure to have the abnormal edges
(which right now expansion recreates from scratch) point to
the middle of __builtin_setjmp expansion (the non-local label we
insert there). Then __builtin_setjmp would be a normal returns_twice
function. But then there is Eric's argument that we also need to revisit
all cfun->calls_setjmp inhibiting optimizations, at least at the tree level,
and for RTL need to keep abnormal edges and kill the rest of the
optimization inhibitions.
Jakub