This is the mail archive of the gcc@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]

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


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