This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] improve tree-ssa-phiopt a little, PR 14466
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 14 May 2004 09:32:23 -0400
- Subject: Re: [PATCH] improve tree-ssa-phiopt a little, PR 14466
- Organization: Red Hat Canada
- References: <ECE2C1A9-A4EA-11D8-BF14-000393A6D2F2@physics.uc.edu>
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.