This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] fix opt/13798


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;
	if (p)
	  x = q;
	else
	  y = q;

Might get transformed to (imaginary target assembly, dest on right),

	movl	&x, t
  	cmovl	p, &y, t
	movl	q, *t



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]