Re: Differences between -O2 and -O3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 16, 2010 at 5:11 PM, bernd Kopf <bayerntoni@xxxxxxxxxx> wrote:
>
>
>
> ----------------------------------------
>> From: tiago.maluta@xxxxxxxxx
>> Date: Mon, 16 Aug 2010 19:55:11 +0000
>> Subject: Re: Differences between -O2 and -O3
>> To: bayerntoni@xxxxxxxxxx
>> CC: gcc-help@xxxxxxxxxxx
>>
>> On Mon, Aug 16, 2010 at 7:45 PM, bernd Kopf  wrote:
>>>
>>> Hello,
>>>
>>> Is there a way to know what are exactly the differences between -O2 and -O3?
>>>
>>
>> $ gcc -c -Q -O3 --help=optimizers> /tmp/O3-opts
>> $ gcc -c -Q -O2 --help=optimizers> /tmp/O2-opts
>> $ diff /tmp/O2-opts /tmp/O3-opts | grep enabled
>>
>> This are described on "man gcc"
>>
>> --tm
> It's what I meant when I said "By comparing the outputs of gcc -O2 -c -Q and gcc -O3 -c -Q"
>

Sorry. I misunderstood.

> Like I said it returns:
>>   -fgcse-after-reload                         [enabled]
>>   -finline-functions                          [enabled]
>>   -fipa-cp-clone                              [enabled]
>>   -fpredictive-commoning                      [enabled]
>>   -ftree-vectorize                            [enabled]
>>   -funswitch-loops                            [enabled]
>
> But adding these options to -O2 don't give the same executable than -O3 (by far)
>

I had never thought of doing this test. I'll try reproduce. But I
don't know why this happens...
Are you using some special test case?

--tm



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux