This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] fix opt/13798
- From: Richard Henderson <rth at redhat dot com>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, rth at atrey dot karlin dot mff dot cuni dot cz, gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Date: Wed, 28 Jan 2004 16:21:17 -0800
- Subject: Re: [tree-ssa] fix opt/13798
- References: <20040128221321.GC3217@redhat.com> <200401282223.i0SMNmJ31297@linsvr1.uk.superh.com>
On Wed, Jan 28, 2004 at 10:23:48PM +0000, Joern Rennecke wrote:
> If the address is also not taken in this function, it means that the address
> is not taken anywhere. Hence, all accesses of this variable can be
> identified positively, and if the other memory access is something unknown
> (e.g. a pointer dereference which was an array access in the source, but
> had to have the address computed into a register first because of limited
> offset ranges and addessing modes), it can't alias.
I don't believe this is correct in general.
All it takes is for (mem (symbol_ref)) to not be a valid address for
(symbol_ref) to be loaded into a register in spite of !TREE_ADDRESSABLE,
and once there it's surely possible for us to lose track of the address.
Even then, if-conversion could conceivably introduce aliases:
static T x, y;
x = q;
y = q;
Might get transformed to (imaginary target assembly, dest on right),
movl &x, t
cmovl p, &y, t
movl q, *t