This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: merging MEM_ATTRS
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: rth at redhat dot com (Richard Henderson)
- Cc: joern dot rennecke at superh dot com (Joern Rennecke), kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner), gcc at gcc dot gnu dot org
- Date: Tue, 10 Feb 2004 21:00:20 +0000 (GMT)
- Subject: Re: RFC: merging MEM_ATTRS
> Generally there's little point. Generally, we know that such
> variables are accessed via offset from a frame pointer, and
> we can find that.
The variables we (SuperH) were doing this optimization originally for
were function-scope static variables.
It appears with -funit-at-a-time we can now verify for all static
variables if they have their address taken.
At any rate, the other memory reference that the variable reference
was checked against for possible aliasing was an generated from an
INDIRECT_REF, and had a zero MEM_EXPR. The alias.c using
non_addressed_function_scope_var assumes that such a variable reference /
NULL_TREE MEM_EXPR pair can't alias, but that is not safe as we
have discussed before, so we want to put something else but NULL_TREE
into MEM_EXPR when we know that an indirection is involved.