This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Improve ability of PRE to detect redundancies
On Nov 29, 2004, at 10:28 AM, Zdenek Dvorak wrote:
I guess this can happen if the original iv happens to be defined in
a phi node. I am not entirely sure rest of ivopts would behave sanely
even if this function is fixed. The proper fix for the function is to
if (TREE_CODE (cand->incremented_at) == PHI_NODE)
before the loop.
On the other hand, the source of the need for the patch -- PRE creating
the wrapped around ivs -- seems like a wrong idea to me. This
transformation seems to do nothing but increase register pressure.
Again, it actually saves a computation, which is why it wants to do it.
I still plan on stopping it from doing it, but we still should be
handling wrap-around variables created elsewhere.
Just because I can easily stop PRE from doing it doesn't mean that it
doesn't occur in real code, and that it isn't something we should
Claiming that PRE is the only source of the need of the patch seems
somewhat suspect, since i've hit wraparounds in real code that
we should be analyzing and optimizing.