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]

Re: should MEM tracking be able to optimize this?


Actually, I just saw how to do it.

Right now, there's a function that looks at a tree for the offset
computation and returns the highest power of two that it's known to
be a multiple of.  That can be replaced by a routine that returns the
highest known multiple (or we can have both routines).

We add a field to the mem attribute structure which we could call
MEM_STRIDE.  If it's nonzero, then MEM_OFFSET does not represent a
constant offset, but an assertion that the actual offset is 
MEM_OFFSET + J * MEM_STRIDE for some value of J.

Then if we have two MEMs with the same stride, we can take the offset
modulo the stride and if those (offset, size) pairs don't conflict, we know
the two MEMs can't.

Is anybody interested in doing this?


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