This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Improve ability of PRE to detect redundancies
On Tue, 2004-11-30 at 16:25 +0100, 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
> > >add
> > >
> > >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.
> well, it replaces addition by assignment, which does not seem to be that
> much of a help (certainly is not comparable with one more register,
I would expect whatever is doing rematerialization would determine
whether it wants to undo that or not :).
However, this is all theoretical since as i said, i've told it not to do
that, and don't have plans to change it. I only emailed Sebastian about
it because i noticed it created variables that we should have been able
to analyze, but couldn't.