Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 12:44 PM Alexandre Oliva wrote: > > ... and here's a patch that uses a try/finally/else gimplefe test to > demonstrate the GIMPLE_EH_ELSE lowering problem (might_throw3 is tagged > as [LP 1] rather than [LP 2]), and fixes it. > > Regstrapped on x86_64-linux-gnu. Ok to inst

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 12:41 PM Alexandre Oliva wrote: > > On Jul 4, 2019, Richard Biener wrote: > > > Yeah. For other stuff we're simply looking at CPP_NAME and > > string-matching, see c_parser_gimple_compound_statement > > where you'd probably hook this into. > > Here's a working patch that

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-11 Thread Alexandre Oliva
... and here's a patch that uses a try/finally/else gimplefe test to demonstrate the GIMPLE_EH_ELSE lowering problem (might_throw3 is tagged as [LP 1] rather than [LP 2]), and fixes it. Regstrapped on x86_64-linux-gnu. Ok to install? allow EH to escape from GIMPLE_EH_ELSE ELSE block The only p

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-11 Thread Alexandre Oliva
On Jul 4, 2019, Richard Biener wrote: > Yeah. For other stuff we're simply looking at CPP_NAME and > string-matching, see c_parser_gimple_compound_statement > where you'd probably hook this into. Here's a working patch that introduces try/finally[/else] in gimplefe. Regstrapped on x86_64-linux

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-04 Thread Richard Biener
On Thu, Jul 4, 2019 at 10:29 AM Alexandre Oliva wrote: > > On Jul 2, 2019, Richard Biener wrote: > > > Yeah, it's on trunk. The parser is ontop of the C frontend and resides > > in gcc/c/gimple-parser.c while testcases are in gcc.dg/gimplefe-*.c > > > The parsing is incomplete, there's no suppo

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-04 Thread Alexandre Oliva
On Jul 2, 2019, Richard Biener wrote: > Yeah, it's on trunk. The parser is ontop of the C frontend and resides > in gcc/c/gimple-parser.c while testcases are in gcc.dg/gimplefe-*.c > The parsing is incomplete, there's no support for parsing try/catch/finally I'm afraid I haven't got very far,

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-02 Thread Richard Biener
On Tue, Jul 2, 2019 at 10:51 AM Alexandre Oliva wrote: > > On Jul 1, 2019, Richard Biener wrote: > > > Oh, I see. The GIMPLE frontend is also missing parsing support > > for the EH stmt kinds, it might have been possible to build a testcase > > with that I guess (yeah, only a very slight hint .

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-02 Thread Alexandre Oliva
On Jul 1, 2019, Richard Biener wrote: > Oh, I see. The GIMPLE frontend is also missing parsing support > for the EH stmt kinds, it might have been possible to build a testcase > with that I guess (yeah, only a very slight hint ... ;)) Ooh, beautiful! Is that in the trunk already? I couldn't

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-07-01 Thread Richard Biener
On Fri, Jun 28, 2019 at 11:43 AM Alexandre Oliva wrote: > > On Jun 27, 2019, Richard Biener wrote: > > > On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: > >> > >> The only preexisting use of GIMPLE_EH_ELSE, for transactional memory > >> commits, did not allow exceptions to escape from th

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-06-28 Thread Alexandre Oliva
On Jun 27, 2019, Richard Biener wrote: > On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: >> >> The only preexisting use of GIMPLE_EH_ELSE, for transactional memory >> commits, did not allow exceptions to escape from the ELSE path. The >> trick it uses to allow the ELSE path to see the

Re: allow EH to escape from GIMPLE_EH_ELSE ELSE block

2019-06-27 Thread Richard Biener
On Thu, Jun 27, 2019 at 10:18 AM Alexandre Oliva wrote: > > The only preexisting use of GIMPLE_EH_ELSE, for transactional memory > commits, did not allow exceptions to escape from the ELSE path. The > trick it uses to allow the ELSE path to see the propagating exception > does not work very well