[patch] Lno branch merge part 12 -- induction variable optimizations
Jeffrey A Law
Mon Aug 30 18:43:00 GMT 2004
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.
More information about the Gcc-patches