Profile Guided Optimization
Main purpose of profile guided optimization is to re-order instructions in an optimal way. Profile-Guided Optimization consists of three phases (or steps):
- Generating instrumented code by compiling with the -prof-gen[x] option when creating the instrumented executable.
- Running the instrumented executable, which produces dynamic-information (.dyn) files.
- Compiling the application using the profile information using the -prof-use.
The figure illustrates the phases and the results of each phase.