This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix reassoc range test vs. value ranges (PR tree-optimization/68671)


On Fri, 4 Dec 2015, Jakub Jelinek wrote:

> On Fri, Dec 04, 2015 at 09:15:25AM +0100, Richard Biener wrote:
> > > +	 modified one, up to and including last_bb, to be executed even if
> > > +	 they would not be in the original program.  If the value ranges of
> > > +	 assignment lhs' in those bbs were dependent on the conditions
> > > +	 guarding those basic blocks which now can change, the VRs might
> > > +	 be incorrect.  As no_side_effect_bb should ensure those SSA_NAMEs
> > > +	 are only used within the same bb, it should be not a big deal if
> > > +	 we just reset all the VRs in those bbs.  See PR68671.  */
> > > +      for (bb = last_bb, idx = 0; idx < max_idx; bb = single_pred (bb), idx++)
> > > +	{
> > > +	  gimple_stmt_iterator gsi;
> > > +	  for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
> > > +	    {
> > > +	      gimple *g = gsi_stmt (gsi);
> > > +	      if (!is_gimple_assign (g))
> > > +		continue;
> > > +	      tree lhs = gimple_assign_lhs (g);
> > > +	      if (TREE_CODE (lhs) != SSA_NAME)
> > > +		continue;
> > > +	      if (INTEGRAL_TYPE_P (TREE_TYPE (lhs)))
> > > +		SSA_NAME_RANGE_INFO (lhs) = NULL;
> > 
> > Please use
> > 
> >      reset_flow_sensitive_info (lhs);
> 
> So maybe better then replace the whole inner loop with
> 	reset_flow_sensitive_info_in_bb (bb);
> ?

Yeah, indeed.  I was confused about the max_id stuff and read you
were handling some blocks partially only.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]