Using profile-directed feedback

You can use profile-directed feedback (PDF) to tune the performance of your application for a typical usage scenario. The compiler optimizes the application based on an analysis of how often branches are taken and blocks of code are run.

Use the PDF process as one of the last steps of optimization before you put the application into production. Optimization at all levels from -O2 up can benefit from PDF. Other optimizations such as the -qipa option and optimization levels -O4 and -O5 can also benefit from PDF process.

The following diagram illustrates the PDF process.

Figure 1. Profile-directed feedback

Profile-directed feedback

To use the PDF process to optimize your application, follow these steps:
  1. Compiling with -qpdf1
  2. Training with typical data sets
  3. Recompiling or linking with -qpdf2


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us