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] Lno branch merge part 12 -- induction variableoptimizations


On Mon, 2004-08-30 at 11:57, Andrew Pinski wrote:
> On Aug 30, 2004, at 9:14 AM, Jeffrey A Law wrote:
> 
> > So far I've "solved" those problems by punting and waiting for
> > DCE to clean things up.  That's been pretty consistent with the
> > design decisions we've made regarding isolation of optimizations.
> >
> > Is there some reason why that model is not appropriate?  For example,
> > does leaving these dead statements in the IL until the next DCE
> > pass actually inhibit optimizations or cause correctness issues?
> >
> >
> > [ While I sometimes lean towards having dead code automatically go
> >   away when the last use of the statement's LHS goes away, I'm
> >   very leery of going that direction because of our past experiences
> >   of doing this kind of thing at the RTL level. ]
> 
> In my loops to memset optimization, I do punt almost everything to
> DCE except for the memory access which I transform to the memset
> call.  So I remove the memory store as it is not removed by DCE.
Yea.  Or you could just transform the store into a nop and let
DCE take care of removing the NOP.

> Also we don't remove loops on later passes which hurt performance.
I would expect this to be a lot less common than the need to
remove a statement -- thus I wouldn't lose much sleep if it
cost more to remove a loop.

jeff



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