This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR17474
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Sep 2004 15:53:05 -0400
- Subject: Re: [patch] for PR17474
- Organization: Red Hat Canada
- References: <20040919215125.GA27765@atrey.karlin.mff.cuni.cz>
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.