This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
memrefs_conflict_p () for REGs in alias.c
- From: George H <grgh007 at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 30 Sep 2002 21:33:57 -0700 (PDT)
- Subject: memrefs_conflict_p () for REGs in alias.c
While looking at the following piece of code, in
memrefs_conflict_p () in alias.c
if (GET_CODE (x) == GET_CODE (y))
switch (GET_CODE (x))
{
......
case REG:
if (alias_invariant)
{
.....
}
break;
}
....
return 1;
I found that it always returns 1 for cse in case of
REG, as the alias_invariant array is NULL. The
alias_invariant is being set in loop unrolling pass
which happens much later than cse. Thus, in cse we
always assume that the two regs always conflict. This
seems to be too pessimistic as there may be cases
where the addresses contained in two regs may be
different. Can we add some intelligence in the
compiler here?
-gh
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com