This is the mail archive of the 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: [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 then,
even if this function is fixed. The proper fix for the function is to

if (TREE_CODE (cand->incremented_at) == PHI_NODE)
  return true;

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 handle.
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.

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