[llvm-dev] Questions about Profile Guided Optimization (PGO)
Reixiong Hu via llvm-dev
llvm-dev at lists.llvm.org
Sun Jun 27 09:46:59 PDT 2021
I am studying the optimizations adopted by LLVM, and finding PGO, which is said to be a good helper for optimization.
Since that requires to instrument and execute the object program, which may be costly for compilation and sometimes inconvenient for developers to come up with test cases, I wonder whether it is a default option for the compilation (i.e., when -O2 or -O3 is enabled)?
If that is the case, how LLVM generates test cases for the profiling if no tests are provided?
If PGO is default and there are no test cases, does LLVM estimate the profiling information, such as frequencies of bbs or calls, statically?
Thanks for your time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev