Using PGO and -O3

Hello all,

clang-related PGO documentation recommends using PGO with -O2 (for
example:
https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization).
The question is: is there any reason why exactly -O2 is used in
examples? Are there any factors which can cause problems when using PGO
with -O3?

Thanks in advance for your advice!

It means using PGO with -O2 and above (including -O3).

David

Maybe we should update the documentation to state this directly? Currently its a little bit confusing.

Sure:

echristo@jhereg ~/s/l/t/clang> git svn dcommit
Committing to https://llvm.org/svn/llvm-project/cfe/trunk
M docs/UsersManual.rst
Committed r323902

-eric