Robert Dewar - Re: [RFC] Enabling loop unrolls at -O3? (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing 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] |
- From: Robert Dewar
- To: Jakub Jelinek
- Cc: Giovanni Bajo , Gabriel Dos Reis ,Steven Bosscher , gcc at gcc dot gnu dot org
- Date: Sun, 06 Nov 2005 09:20:21 -0500
- Subject: Re: [RFC] Enabling loop unrolls at -O3?
- References: <436D712E.3050704@adacore.com> <m3hdaq9d8q.fsf@uniton.integrable-solutions.net> <04f801c5e2ce$2f629f60$09be2997@bagio> <20051106124024.GC16723@sunsite.mff.cuni.cz>
Jakub Jelinek wrote:
Including loop unrolling to -O2 is IMNSHO a bad idea, as loop unrolling increases code size, sometimes a lot. And the distinction between -O2 and -O3 is exactly in the space-for-speed tradeoffs.
That's certainly a valid way of defining the difference (and certainly used to be the case in the old days when the principle extra optimization was inlining)
On many CPUs for many programs, -O3 generates slower code than -O2, because the cache footprint disadvantages override positive effects of the loop unrolling, extra inlining etc.
That's what we have found, though I would have thought it unusual that loop unrolling would run into this cache effect in most cases.
Jakub
- Follow-Ups:
- Re: [RFC] Enabling loop unrolls at -O3?
* From: Mattias Engdeg�rd
- Re: [RFC] Enabling loop unrolls at -O3?
- References:
- Re: [RFC] Enabling loop unrolls at -O3?
* From: Robert Dewar - Re: [RFC] Enabling loop unrolls at -O3?
* From: Gabriel Dos Reis - Re: [RFC] Enabling loop unrolls at -O3?
* From: Giovanni Bajo - Re: [RFC] Enabling loop unrolls at -O3?
* From: Jakub Jelinek
- Re: [RFC] Enabling loop unrolls at -O3?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |