Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-27 Thread Richard Biener
On Tue, Nov 26, 2013 at 11:37 PM, Jeff Law l...@redhat.com wrote: On 11/26/13 02:26, Richard Biener wrote: But only necessary if this threading returned true, no? Correct. Fix for that spinning overnight. Also how likely did it scramble the loop? I see that thread_block_1 already

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-27 Thread Jeff Law
On 11/27/13 04:28, Richard Biener wrote: Ick ;) Loop fixup isn't able to recover the original loop here, it discovers a new one, the one just covering looping through the default: case of the switch. I wouldn't expect it to. I don't have the transformed CFG in front of me right now, but as

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-26 Thread Richard Biener
On Mon, Nov 25, 2013 at 7:25 PM, Jeff Law l...@redhat.com wrote: On 11/22/13 08:56, Richard Biener wrote: So the issue here is we can create irreducible regions new nested loops. Does just setting the header,latch fields for the current loop handle those cases? Yes. Fixed via the

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-26 Thread Jeff Law
On 11/26/13 02:26, Richard Biener wrote: But only necessary if this threading returned true, no? Correct. Fix for that spinning overnight. Also how likely did it scramble the loop? I see that thread_block_1 already cancels loops in some cases so I wonder what case it misses so that you

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-25 Thread Jeff Law
On 11/22/13 08:56, Richard Biener wrote: So the issue here is we can create irreducible regions new nested loops. Does just setting the header,latch fields for the current loop handle those cases? Yes. Fixed via the attached patch. Bootstrapped and regression tested on

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-22 Thread Richard Biener
On Fri, Nov 22, 2013 at 8:48 AM, Jeff Law l...@redhat.com wrote: Right now jump threads from within a loop which cross the loop header, then terminate within the loop are ignored as this may create irreducible loops. This patch gets the CFG/SSA updating code in good enough shape to handle the

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-22 Thread Jeff Law
On 11/22/13 05:10, Richard Biener wrote: + if (totally_clobbered_loops) +{ + /* Release the current loop structures, they are totally +clobbered at this point. */ + loop_optimizer_finalize (); + current_loops = NULL; This is definitely a no-go and should be

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-22 Thread Richard Biener
Jeff Law l...@redhat.com wrote: On 11/22/13 05:10, Richard Biener wrote: + if (totally_clobbered_loops) +{ + /* Release the current loop structures, they are totally +clobbered at this point. */ + loop_optimizer_finalize (); + current_loops = NULL; This is

Re: [PATCH] Improve handling of threads which cross over the current loops header

2013-11-22 Thread Jeff Law
On 11/22/13 08:56, Richard Biener wrote: So the issue here is we can create irreducible regions new nested loops. Does just setting the header,latch fields for the current loop handle those cases? Yes. Good. I'll take care of it. Thanks, Jeff

[PATCH] Improve handling of threads which cross over the current loops header

2013-11-21 Thread Jeff Law
Right now jump threads from within a loop which cross the loop header, then terminate within the loop are ignored as this may create irreducible loops. This patch gets the CFG/SSA updating code in good enough shape to handle the case that the embedded guys care about. ie, the coremark