This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Virtual operands of &a[1]?
On Wed, 2003-12-03 at 17:12, Zdenek Dvorak wrote:
> Index: tree-dfa.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
> retrieving revision 1.1.4.194
> diff -c -3 -p -r1.1.4.194 tree-dfa.c
> *** tree-dfa.c 2 Dec 2003 22:57:59 -0000 1.1.4.194
> --- tree-dfa.c 3 Dec 2003 19:59:55 -0000
> *************** get_expr_operands (tree stmt, tree *expr
> *** 357,362 ****
> --- 357,367 ----
> && subcode != ARRAY_REF)
> return;
>
> + /* If the address is invariant, there may be no interesting variable
> + references inside. */
> + if (is_gimple_min_invariant (expr))
> + return;
> +
> /* Avoid recursion. */
> code = subcode;
> class = TREE_CODE_CLASS (code);
>
Exactly. Except that we actually need the opf_no_vuses flag you
introduced. We don't want to create a VUSE for &ptr->field. You can
commit this patch. I am currently testing the other half.
Diego.