Profile Guided Optimization

From CDOT Wiki
Revision as of 11:25, 2 February 2015 by Chris Tyler (talk | contribs) (Created page with 'Category:SPO600 Profile-Guided Optimization (PGO) is an optimization technique where a performance profile is fed to the compiler to provide optimization information that is …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Profile-Guided Optimization (PGO) is an optimization technique where a performance profile is fed to the compiler to provide optimization information that is not directly evident from the source code, such as branching patterns which are the result of patterns in the input data.

PGO involves these steps:

  • A version of the program is built with profiling enabled.
  • A representative test run is performed, and profile data is collected.
  • The program is re-compiled, with the profile data provided as one of the inputs to the compiler.

Both GCC and LLVM have PGO features. Note that the profiling options, instrumentation, and profile data is not the same as that used with other tools such as gprof.