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

Re: [RFC] Enabling loop unrolls at -O3?


Steven Bosscher <stevenb@suse.de> wrote:

>>> Steven Bosscher <stevenb@suse.de> wrote:
>>>>> I guess the issue is what does "huge" mean, it is hard to discuss
>>>>> based on loaded adjectives taking the place of data :-)
>>>>
>>>> Huge here means 15-20% on x86* hosts.
>>>
>>> I don't consider this huge for -O3. I think -O3 can be slower if it
>>> achieves better code, and -funroll-loops makes it do just that.
>>
>> I would certainly agree, I am not sure I even find it huge for -O2.
>> After all 20% compile time represents a couple of months advance
>> in computer hardware (and that is true across the board, even if
>> you are talking about upgrading 1990 hardware to 1991 hardware :-))
>
> You must not have been paying attention to one of the most frequent
> complaints about gcc, which is that it is dog slow already ;-)


It's not disabling the optimizers that you are making it faster.

I believe you are missing my point. What is the GCC command line option for
"try to optimize as best as you can, please, I don't care compiletime"? I
believe that should be -O3. Otherwise let's make -O4. Or -O666. The only real
argument I heard till now is that -funroll-loops isn't valuable without profile
feedback. My experience is that it isn't true, I for sure use it for profit in
my code. But it looks like the only argument that could make a difference is
SPEC, and SPEC is not freely available. So I'd love if someone could
SPEC -funroll-loops for me.

Giovanni Bajo


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