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] improve tree-ssa-phiopt a little, PR 14466


On Thu, 2004-05-13 at 10:36, Andrew Pinski wrote:

>    return j;
> 
> /* Should have n ifs left after straightening.  */
>                ^^
                 no

> /* { dg-final { scan-tree-dump-times "if " 0 "phiopt1"} } */
> 
> ChangeLog:
> 
> 	* tree-ssa-phiopt.c (make_temp): New function.	
> 	(conditional_replacement): When we get non gimple create
> 	a temporary variable to hold the casted expression.
> 
OK, with the change below:


> +/* Build a temporary.  Make sure and register it to be renamed.  */
> +
> +static tree
> +make_temp (tree type)
> +{
> +  tree t = create_tmp_var (type, NULL);
> +  add_referenced_tmp_var (t);
> +  bitmap_set_bit (vars_to_rename, var_ann (t)->uid);
> +  return t;
> +}
> 
This already exists in tree-complex.c, please make it extern and move to
tree-dfa.c.  See if it can be factored somewhere else.


Diego.


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