Re: [PATCH] Improve backwards threading

2016-08-11 Thread Jeff Law
On 08/09/2016 07:13 AM, Richard Biener wrote: On Fri, 5 Aug 2016, Jeff Law wrote: On 08/05/2016 07:36 AM, Richard Biener wrote: @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths edge taken_edge = profitable_jump_thread_path (path, bbi, name, arg); if

Re: [PATCH] Improve backwards threading

2016-08-11 Thread Richard Biener
On Tue, 9 Aug 2016, Richard Biener wrote: > On Fri, 5 Aug 2016, Jeff Law wrote: > > > On 08/05/2016 07:36 AM, Richard Biener wrote: > > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > > arg); > > >

Re: [PATCH] Improve backwards threading

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Jeff Law wrote: > On 08/05/2016 07:36 AM, Richard Biener wrote: > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > arg); > > if (taken_edge) > > { > > +

Re: [PATCH] Improve backwards threading

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Jeff Law wrote: > On 08/05/2016 07:36 AM, Richard Biener wrote: > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > arg); > > if (taken_edge) > > { > > +

Re: [PATCH] Improve backwards threading

2016-08-05 Thread Jeff Law
On 08/05/2016 07:36 AM, Richard Biener wrote: @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths edge taken_edge = profitable_jump_thread_path (path, bbi, name, arg); if (taken_edge) { + /* If the taken edge is a loop entry avoid mashing two

Re: [PATCH] Improve backwards threading

2016-08-05 Thread Richard Biener
On Fri, 5 Aug 2016, Richard Biener wrote: > On Fri, 5 Aug 2016, Richard Biener wrote: > > > > > This avoids regressing gcc.dg/tree-ssa/pr21417.c with the fix for > > PR72772 where after it a forwarder block no longer is present. > > It's easy to simply create it when FSM threading faces the

Re: [PATCH] Improve backwards threading

2016-08-05 Thread Richard Biener
On Fri, 5 Aug 2016, Richard Biener wrote: > > This avoids regressing gcc.dg/tree-ssa/pr21417.c with the fix for > PR72772 where after it a forwarder block no longer is present. > It's easy to simply create it when FSM threading faces the situation > that the edge ending the path enters a loop. >

[PATCH] Improve backwards threading

2016-08-05 Thread Richard Biener
This avoids regressing gcc.dg/tree-ssa/pr21417.c with the fix for PR72772 where after it a forwarder block no longer is present. It's easy to simply create it when FSM threading faces the situation that the edge ending the path enters a loop. I also fixed the costs for obviously related anon SSA