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] Speedup gimple_assign_rhs_code, inline gimple_assign_single_p


On Sat, 27 Nov 2010, Michael Matz wrote:

> Hi,
> 
> On Sat, 27 Nov 2010, Richard Guenther wrote:
> 
> Due to this:
> 
> > - bool
> > - is_gimple_cast (tree t)
> > - {
> > -   return (CONVERT_EXPR_P (t)
> > -           || TREE_CODE (t) == FIX_TRUNC_EXPR);
> > - }
> 
> the following change is not equivalent:
> 
> > *** 1273,1279 ****
> >   	  /* If the result is not a valid gimple value, or not a cast
> >   	     of a valid gimple value, then we cannot use the result.  */
> >   	  if (is_gimple_val (new_val)
> > ! 	      || (is_gimple_cast (new_val)
> >   		  && is_gimple_val (TREE_OPERAND (new_val, 0))))
> >   	    return new_val;
> >   	}
> > --- 1273,1279 ----
> >   	  /* If the result is not a valid gimple value, or not a cast
> >   	     of a valid gimple value, then we cannot use the result.  */
> >   	  if (is_gimple_val (new_val)
> > ! 	      || (CONVERT_EXPR_P (new_val)
> >   		  && is_gimple_val (TREE_OPERAND (new_val, 0))))
> >   	    return new_val;
> 
> (same for the ipa-type-escape.c change).  It seems odd to regard 
> FIX_TRUNC_EXPR as is_gimple_cast, but not the other several truncations or 
> the like, but I thought to mention it to make sure that was intended.

I know, but in the context FIX_TRUNC_EXPR is irrelevant and indeed
the reason I deleted the predicate is that its implementation is
incomplete (or uses a very bad name).

Richard.


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