This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/60537] Loop header copying code bloat for simple loops that don't benefit
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Mar 2014 09:43:36 +0000
- Subject: [Bug tree-optimization/60537] Loop header copying code bloat for simple loops that don't benefit
- Auto-submitted: auto-generated
- References: <bug-60537-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60537
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-17
Summary|Loop optimization code |Loop header copying code
|bloat for simple loops |bloat for simple loops that
| |don't benefit
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For -O2 we do this to enable loop optimizations which almost all require
do { } while style loops. This canonicalization can sometimes peel an
entire iteration as you can see here, and this canonicalization is
not done at -Os unless the loop is determined as hot (so with -Os
and profile-feedback some loops may get this treatment).
It's hard to undo this transform but that's what would be needed here ...
(or make more passes deal with number-of-iterations == n or zero)