This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Improve ability of PRE to detect redundancies
> >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)
> > 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 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.
Sorry, I misunderstood that part.