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


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.


Ciao,
Michael.


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