Automatic Propagation of Profile Information through the Optimization Pipeline
Profile-guided optimization (PGO) is a well-established technique for improving program performance, being integrated into major compilers such as GCC, LLVM/Clang, and Microsoft Visual C++. PGO collects information about a program's execution and uses it to guide optimizations such as inlining, and code layout. However, these very transformations alter the program's control flow, rendering the collected profiles stale or inaccurate. To deal with this problem, this paper investigates how to reuse profile data after optimization without re-executing the program. We study two complementary strategies: prediction, which estimates likely hot code paths in the optimized program, and projection, which transfers profile information from the original control-flow graph to its transformed version. We evaluate several techniques for reconstructing profile data, including a large language model (LLM)–based approach using GPT-4o, and a lightweight method that compares opcode histograms of code regions recursively to identify structural similarities. Our results show that the histogram-based method is not only simpler but also consistently more accurate than both the LLM-based approach and prior prediction and projection techniques, including those implemented in LLVM and the BOLT binary optimizer.
Authors
- Angélica Aparecida Moreira (ORCID: https://orcid.org/0000-0001-5256-2054)
- Elisa Fröhlich
- F. B. Pereira
Institutions
- Universidade Federal de Minas Gerais (BR)
- Microsoft (United States) (US)
- Microsoft Research (United Kingdom) (GB)
Publication Details
- Journal
- Proceedings of the ACM on Programming Languages
- Published
- 2026-04-10
- DOI
- https://doi.org/10.1145/3798247
- Primary Topic
- Parallel Computing and Optimization Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Coordenação de Aperfeiçoamento de Pessoal de Nível Superior
- Conselho Nacional de Desenvolvimento Científico e Tecnológico
- Fundação de Amparo à Pesquisa do Estado de Minas Gerais