Rate This Document
Findability
Accuracy
Completeness
Readability

Automatic FDO

Profile-guided optimization (PGO) is a compiler optimization technique that uses instrumentation to collect runtime profile of a program. The compiler then makes use of the runtime profile and leverages various compilation optimization technologies to make more accurate optimization decisions and generate more efficient programs.

The A-FOT tool improves automatic FDO of GCC for openEuler. It supports the following modes:

  • AutoFDO is a simplified version of PGO that uses perf instead of instrumentation to obtain the program runtime profile. The optimization technologies include vectorization, loop unrolling, and loop fission.
  • AutoPrefetch is an enhanced prefetch optimizer. Based on the Dcache access and the cache miss rate of access instructions, AutoPrefetch obtains code blocks that can be used for data access optimization, optimizes the prefetch and prefetch lookahead. It is recommended that AutoPrefetch be used together with AutoFDO.
  • AutoBOLT is a post-link binary optimizer, which works excellently on programs with complex control flows. The optimization technologies include basic block reordering, function reordering, and function splitting (hot and cold blocks). AutoBOLT cannot be used together with AutoFDO and AutoPrefetch.

For details about how to install and deploy A-FOT, see Installing A-FOT in the Kunpeng Native Development Pipeline Phase User Guide.