Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-08 Thread Eric Botcazou
> Looks like I have to build a cross to a sjlj EH target ... Let's clear a common misconception here: the SJLJ EH scheme implemented in C++ doesn't explicitly use __builtin_setjmp/__buitin_longjmp so it won't help to understand how things work for the case at hand; it's instead a hybrid scheme,

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082, take 2)

2014-02-07 Thread Richard Biener
On Thu, 6 Feb 2014, Jakub Jelinek wrote: > On Thu, Feb 06, 2014 at 11:00:14AM +0100, Richard Biener wrote: > > Ah, so __builtin_setjmp_receiver is like setjmp in this regard > > and setjmp is LEAF (it's a stmt that doesn't direct control-flow > > anywhere else). So __builtin_setjmp_receiver shoul

[PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082, take 2)

2014-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2014 at 11:00:14AM +0100, Richard Biener wrote: > Ah, so __builtin_setjmp_receiver is like setjmp in this regard > and setjmp is LEAF (it's a stmt that doesn't direct control-flow > anywhere else). So __builtin_setjmp_receiver should be LEAF as well > (and so should __builtin_setjm

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Jakub Jelinek
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 __built

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Richard Biener
On Thu, 6 Feb 2014, Jakub Jelinek wrote: > On Thu, Feb 06, 2014 at 10:33:54AM +0100, Richard Biener wrote: > > > Not even in call_can_make_abnormal_goto? I mean, as we split > > > __builtin_setjmp into __builtin_setjmp{_setup,_receiver} and the former > > > has abnormal edge out of it, there is n

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2014 at 10:33:54AM +0100, Richard Biener wrote: > > Not even in call_can_make_abnormal_goto? I mean, as we split > > __builtin_setjmp into __builtin_setjmp{_setup,_receiver} and the former > > has abnormal edge out of it, there is no need to have another abnormal edge > > out of th

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Richard Biener
On Thu, 6 Feb 2014, Jakub Jelinek wrote: > On Thu, Feb 06, 2014 at 10:13:25AM +0100, Richard Biener wrote: > > > trunk? Alternatively we could special case BUILT_IN_SETJMP_RECEIVER > > > instead > > > in call_can_make_abnormal_goto, there is probably no need to have AB edge > > > out of __builti

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Jakub Jelinek
On Thu, Feb 06, 2014 at 10:13:25AM +0100, Richard Biener wrote: > > trunk? Alternatively we could special case BUILT_IN_SETJMP_RECEIVER instead > > in call_can_make_abnormal_goto, there is probably no need to have AB edge > > out of __builtin_setjmp_receiver, we already have one out of > > __built

Re: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-06 Thread Richard Biener
On Thu, 6 Feb 2014, Jakub Jelinek wrote: > Hi! > > I've looked at the spawner_inline.c timeout issue, and it looks like the > problem is that __builtin_setjmp_receiver is a stmt_ends_bb_p call and > insert_backedge_copies then happily inserts statements before the call, > because it can't insert

[PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082)

2014-02-05 Thread Jakub Jelinek
Hi! I've looked at the spawner_inline.c timeout issue, and it looks like the problem is that __builtin_setjmp_receiver is a stmt_ends_bb_p call and insert_backedge_copies then happily inserts statements before the call, because it can't insert them after the call. But __builtin_setjmp_receiver is