This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360



------- Comment #22 from rakdver at kam dot mff dot cuni dot cz  2007-11-24 21:52 -------
Subject: Re:  [4.3 Regression] Code size regression caused by fix to PR 31360

> > Why?  If using dec and branch is profitable, doloop pass should do it; the
> > transformation that ivopts do does not prevent that or make it any more
> > difficult.
> 
> I'm not sure that blindly doing transformations in the hope that subsequent
> ones will repair the potential damages is always the way to go.  Why not
> avoid causing the damages in some cases?  Is that really too "old-style"?

Ivopts cannot create decrease-and-branch instruction by itself, as it is
run on trees.  So we have to rely on doloop to do so.  For doloop, the
exact shape of the exit test does not matter, so whether ivopts will do
the transformation or not is completely irrelevant.

So, while altering the cost function of ivopts to take decrease-and-branch
patterns into account and preserving the decreasing induction variable
would not be too hard (although it is a bit dubious whether it would
also be wise), I do not see how that would help.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849


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