Re: PR tree-optimization/54985

2012-10-26 Thread Jeff Law
On 10/23/2012 03:43 PM, Jakub Jelinek wrote: On Tue, Oct 23, 2012 at 03:34:46PM -0600, Jeff Law wrote: I think it should be backported to 4.7, perhaps with a few days delay after the trunk commit. Do we even have debug statements after control flow statements? They shouldn't be there, so if y

Re: PR tree-optimization/54985

2012-10-24 Thread Jeff Law
On 10/23/2012 03:43 PM, Jakub Jelinek wrote: On Tue, Oct 23, 2012 at 03:34:46PM -0600, Jeff Law wrote: I think it should be backported to 4.7, perhaps with a few days delay after the trunk commit. Do we even have debug statements after control flow statements? They shouldn't be there, so if y

Re: PR tree-optimization/54985

2012-10-23 Thread Sharad Singhai
The following trivial patch seems to fix it. Index: tree-ssa-threadedge.c === --- tree-ssa-threadedge.c (revision 192749) +++ tree-ssa-threadedge.c (working copy) @@ -743,7 +743,7 @@ safe to thread this edge. */ if (e->flags

Re: PR tree-optimization/54985

2012-10-23 Thread Sharad Singhai
The trunk seems to be broken at r192749 due to this patch. ../../srctrunk/gcc/tree-ssa-threadedge.c: In function ‘void thread_across_edge(gimple_statement_d*, edge_def*, bool, vec_t**, tree_node* (*)(gimple_statement_d*, gimple_statement_d*))’: ../../srctrunk/gcc/tree-ssa-threadedge.c:583: error:

Re: PR tree-optimization/54985

2012-10-23 Thread Jakub Jelinek
On Tue, Oct 23, 2012 at 03:34:46PM -0600, Jeff Law wrote: > >I think it should be backported to 4.7, perhaps with a few days delay after > >the > >trunk commit. > Do we even have debug statements after control flow statements? They shouldn't be there, so if you just give up the same way for gsi_s

Re: PR tree-optimization/54985

2012-10-23 Thread Jeff Law
On 10/23/2012 03:22 PM, Jakub Jelinek wrote: On Tue, Oct 23, 2012 at 03:21:59PM -0600, Jeff Law wrote: On 10/23/2012 02:50 PM, Jakub Jelinek wrote: +static bool +cond_arg_set_in_bb (edge e, basic_block bb, int n) +{ + ssa_op_iter iter; + use_operand_p use_p; + gimple last = gsi_stmt (gsi_las

Re: PR tree-optimization/54985

2012-10-23 Thread Jakub Jelinek
On Tue, Oct 23, 2012 at 03:21:59PM -0600, Jeff Law wrote: > On 10/23/2012 02:50 PM, Jakub Jelinek wrote: > >>+static bool > >>+cond_arg_set_in_bb (edge e, basic_block bb, int n) > >>+{ > >>+ ssa_op_iter iter; > >>+ use_operand_p use_p; > >>+ gimple last = gsi_stmt (gsi_last_bb (e->dest)); > > >

Re: PR tree-optimization/54985

2012-10-23 Thread Jeff Law
On 10/23/2012 02:50 PM, Jakub Jelinek wrote: On Tue, Oct 23, 2012 at 02:35:24PM -0600, Jeff Law wrote: +/* Return TRUE if the statement at the end of e->dest depends on + the output of any statement in BB. Otherwise return FALSE. + + This is used when we are threading a backedge and need t

Re: PR tree-optimization/54985

2012-10-23 Thread Jakub Jelinek
On Tue, Oct 23, 2012 at 02:35:24PM -0600, Jeff Law wrote: > +/* Return TRUE if the statement at the end of e->dest depends on > + the output of any statement in BB. Otherwise return FALSE. > + > + This is used when we are threading a backedge and need to ensure > + that temporary equivalenc

PR tree-optimization/54985

2012-10-23 Thread Jeff Law
When we try to thread across a back edge in the CFG we have a check to ensure that we don't use temporary equivalences which are invalidated by traversal of the back edge to simplify the final conditional. About a year ago I added code to pick up secondary threading opportunities after an in