Difference between revisions of "Profile Guided Optimization"

From CDOT Wiki
Jump to: navigation, search
(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 …')
 
 
Line 1: Line 1:
 
[[Category:SPO600]]
 
[[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 not directly evident from the source code, such as branching patterns which are the result of patterns in the input data.
+
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, frequency of function calls, and number of iterations typically peformed of each loop. This information affects optimizations such as code relocation, inlining, and loop unrolling.
  
 
PGO involves these steps:
 
PGO involves these steps:

Latest revision as of 16:36, 31 January 2017

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, frequency of function calls, and number of iterations typically peformed of each loop. This information affects optimizations such as code relocation, inlining, and loop unrolling.

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.