Rate This Document
Findability
Accuracy
Completeness
Readability

Using PGO for Compilation

Symptom

After a microarchitecture analysis task is created, a message "Use PGO for compilation" is displayed when you view the Summary tab page of the analysis result.

Possible Cause

Profile-guided optimization (PGO) is needed for compilation.

PGO improves application performance by reducing cache-thrashing, reorganizing code layout, reducing code length, and reducing branch mispredictions.

Troubleshooting Procedure

  1. Add the -fprofile-generate=<profile_dir> option during compilation.
  2. Compile and run the software, and collect configuration files.
  3. Recompile the software with the option -fprofile-use=<profile_dir> to use configuration files collected in 2, so as to complete the compilation with PGO.