paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatic Propagation of Profile Information through the Optimization Pipeline

优化流水线中 Profile 信息的自动传播
OOPSLA 10(OOPSLA1)2026匹配度 2/10 · 论文主题是编译优化流水线中的 profile 信息传播,属于编译器/PGO 方向,与用户关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析没有直接关系;LLM 仅作为对比基线,并非用 LLM/Agent 改进程序分析的核心研究。引用 0 inbox
Elisa Fröhlich, Angélica Moreira, Fernando Magno Quintão Pereira
crossref: 2026-09-10

AI 速览

一句话:提出递归比较代码区域 opcode 直方图的轻量方法,在优化流水线中自动传播 profile 信息,比 LLM 与 LLVM/BOLT 方法更准确。

Profile-guided optimization(PGO)利用程序执行信息指导内联、代码布局等优化,但优化变换会改变控制流,使收集到的 profile 过期或不准确。本文研究在不重新执行程序的前提下复用 profile 数据,考察两种互补策略:prediction 预测优化后程序中的热路径,projection 将 profile 信息从原始控制流图迁移到变换后的控制流图。作者评估了多种 profile 重建技术,包括基于 GPT-4o 的大语言模型方法与递归比较代码区域 opcode 直方图的轻量方法。结果表明,基于直方图的方法不仅更简单,而且始终比 LLM 方法以及 LLVM、BOLT 中已有的 prediction 与 projection 技术更准确。

问题
PGO 收集的 profile 在优化改变控制流后会失效,如何在不重新运行程序的情况下复用这些 profile 数据。
方法
研究 prediction 与 projection 两种互补策略,并比较多种 profile 重建技术,包括基于 GPT-4o 的 LLM 方法和递归比较代码区域 opcode 直方图的轻量方法。
评估
在优化流水线上评估 profile 重建的准确性,并与 LLM 方法及 LLVM、BOLT 中已有的 prediction 和 projection 技术进行对比。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot3825,
  title = {Automatic Propagation of Profile Information through the Optimization Pipeline},
  author = {Elisa Fröhlich and Angélica Moreira and Fernando Magno Quintão Pereira},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA1},
  year = {2026},
  doi = {10.1145/3798247}
}