c++ - Can I get a log of optimizations applied by the compiler? -


this question has answer here:

when compiling c++ application or library optimizations turned on, -o3 gcc, there way applied optimizations listed? mean, without comparing actual byte code. interesting learn.

from

http://gcc.gnu.org/onlinedocs/gcc/debugging-options.html

the -fopt-info family of switches causes optimizer dump out information stderr (or file if prefer). in particular, -fopt-info-missed can useful see why optimisation could not applied.

there quite few different combinations available. linked page:

for example,

          gcc -o3 -fopt-info-missed=missed.all 

outputs missed optimization report passes missed.all.

as example,

  gcc -o3 -fopt-info-inline-optimized-missed=inline.txt 

will output information missed optimizations optimized locations inlining passes inline.txt.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -