This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360
- From: "rakdver at kam dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2007 21:52:57 -0000
- Subject: [Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360
- References: <bug-31849-374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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