Optimization report from gcc's pgo

1k Views Asked by At

I can see that gcc's PGO (profile guided optimization) works fine with my application (~15% faster execution). I'm using '-fprofile-generate' and then '-fprofile-use'. But is there any way to generate some report describing what and how has been optimized? I know Intel compiler (icc) can do that, but how about gcc?

2

There are 2 best solutions below

0
On

An option is to use perf and analyze cache hits/miss changes as well as other events. While this is not necessarily a indication what was changed, it provides an overview of what types of changes can be made aiming optimizations.

1
On

There is -fdump-ipa-all or -fdump-ipa-cgraph these don't produce pretty reports but it's probably the closest thing to an optimization report you'll find in gcc. Also some optimization options have verbose output which will tell you exactly what was optimized, like -ftree-vectorizer-verbose=n. You can check out more details here.