I just discovered the nice "-Minfo=" flag in pgcc, which outputs all the optimizations that the compiler is making.
IE:
pgcc -c -pg -O3 -Minfo=all -Minline -c -o example.o example.c
run:
55, Memory zero idiom, loop replaced by call to __c_mzero8
91, Memory zero idiom, loop replaced by call to __c_mzero8
pgcc -c -pg -O3 -Minfo=all -Minline -c -o controller.o controller.c
main:
82, second inlined, size=4, file controller.c (113)
84, second inlined, size=4, file controller.c (113)
is there an equivalent compiler flag for GCC?
Yes there is.
-fopt-infois what you are looking for.Or equivalently you can do
Will output all the optimization information to file
all.dat. You can also be specific about which optimization information you want by specifying-fopt-info-optionslike so:You can get more specific if you want by telling
gccto dump information only aboutloops/inlinings/vectorizationsthat were optimized or were missedFor more details look at the online documentation.