This is the mail archive of the gcc-help@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: g++ optimizer report?


On Mon, Feb 8, 2010 at 2:05 AM, Yue K. Li <yue.kevin.li@gmail.com> wrote:
> Hi, John,
>
> On Wed, Feb 3, 2010 at 6:32 AM, John (Eljay) Love-Jensen
> <eljay@adobe.com> wrote:
>> Hi Yue,
>>
>> You can get a list of toggle-able optimization flags like this:
>>
>> touch Empty.cpp
>> gcc -O2 -fverbose-asm -S Empty.cpp -o O2.s
>> gcc -O3 -fverbose-asm -S Empty.cpp -o O3.s
>>
>> However, that will not tell you what non-toggle-able optimizations are enabled, since -O2 enables many optimizations that are not controlled by command line flags. ?And -O3 enables a few more, as I understand it.
>>
> ?This is interesting, and works.
>
>> Nor will that tell you what optimization(s) were applied to a particular code segment.
>>
     I think it would be great if gcc/g++ will have this kind of
optimization report feature, it would be very helpful for doing
performance analysis.

Cheers,

Yue


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