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] for PR17474


On Sun, 2004-09-19 at 17:51, Zdenek Dvorak wrote:

> +   type_mem_tag = var_ann (old_var)->type_mem_tag;
> +   if (!type_mem_tag)
> +     type_mem_tag = old_var;
> + 
What are you trying to do here?  This looks wrong.  You are making the
tag be another pointer.

> +   type = build_pointer_type (TREE_TYPE (field));
> +   new_var = create_tmp_var (type, "cspntmp");
> +   add_referenced_tmp_var (new_var);
> +   var_ann (new_var)->type_mem_tag = type_mem_tag;
> + 
> +   if (old_name)
> +     {
> +       /* We use duplicate_ssa_name to copy the aliasing information
> + 	 from old_name.  A bit hacky.  */
> +       new_name = duplicate_ssa_name (old_name, stmt);
> +       SSA_NAME_VAR (new_name) = new_var;
> +       TREE_TYPE (new_name) = type;
> +     }
> +   else
> +     new_name = make_ssa_name (new_var, stmt);
> + 
>
Hmm, I guess.  Do you think you could factor some of this code in
tree-ssa.c?  I've seen similar patterns in other parts of
tree-ssa-loop-ivopts.c.


Thanks.  Diego.


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