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: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: joern dot rennecke at superh dot com, gcc at gcc dot gnu dot org
- Date: Tue, 10 Feb 2004 18:43:47 +0000 (GMT)
- Subject: Re: RFC: merging MEM_ATTRS
> http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03234.html
>
> I don't see the discussion from there,
Funny, the references links work just fine for me.
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03141.html
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03165.html
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03201.html
> but certainly something is
> wrong: zeroing a field like MEM_EXPR means you don't know anything, so
> I don't see how doing do can produce an incorrect optimization.
A lot of MEM_EXPRs from pointer dereferences are zero right from RTL
generation, while for all explicit references of a variable,
we have a proper MEM_EXPR describing just that varaible.
The optimization I am trying to add recognizes a class of variables where
all references are explicit, and then 'knows' that MEMs that reference
such variables can't alias MEMs that don't reference them.
I.e. a zero MEM_EXPR means that we don't know anything of the access except
that it can't be for any specific variable which didn't have its address
taken.
For this to work correctly, when we start to merge MEM_EXPRs, we need
to keep track of MEMs that may or may not refer to specific variables.