c++ - Can I get a log of optimizations applied by the compiler? -
this question has answer here:
- getting optimization report gcc 1 answer
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
Post a Comment