This is the mail archive of the gcc-patches@gcc.gnu.org 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 Tue, 2004-11-30 at 16:25 +0100, Zdenek Dvorak wrote:
> Hello,
> 
> > >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,
> needed).

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.

--Dan


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