This is the mail archive of the
mailing list for the GCC project.
Re: should MEM tracking be able to optimize this?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dan at cgsoftware dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 18 Nov 01 08:16:11 EST
- Subject: 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?