paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Compiler Auto-Tuning via Critical Flag Selection

基于关键优化选项选择的编译器自动调优
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 2/10 · 论文研究编译器自动调优与关键优化 flag 选择,属于 PL/编译器工程方向,但未涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析;仅在 PL 与 benchmark 实验层面有弱关联。引用 21 inbox
Mingxuan Zhu, Dan Hao
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:通过分析程序结构与编译器文档筛选关键优化 flag,缩小搜索空间,实现高效的编译器自动调优。

GCC 等广泛使用的编译器包含数百个由优化 flag 控制的优化,用户很难手动完成调优;已有自动调优技术在整个优化空间中设计搜索策略来寻找优化序列,但面临搜索空间巨大、效率低下的问题。为缩减搜索空间,本文提出基于关键 flag 选择的方法 CFSCA:首先通过分析目标程序结构与编译器文档,找出与程序潜在相关的 flag;随后基于不同优化序列下程序预测运行时性能的统计分析,识别其中的关键 flag;最后在缩减后的搜索空间中选择期望的优化序列。作者在最新版 GCC 与广泛使用的 cBench 基准上开展实验,结果表明 CFSCA 显著优于四种对比技术,包括当前最先进的 BOCA。

问题
编译器优化 flag 数量庞大且组合方式极多,手动调优困难;现有自动调优技术在整个优化空间中搜索,因搜索空间巨大而效率低下。
方法
CFSCA 先结合程序结构分析与编译器文档筛选与目标程序潜在相关的 flag,再通过对不同优化序列下预测运行时性能的统计分析识别关键 flag,从而在缩减的搜索空间中选择优化序列。
评估
在最新版 GCC 编译器和广泛使用的 cBench 基准上开展大量实验,并与四种对比技术(包括最先进的 BOCA)比较,CFSCA 显著更优。
原文摘要(Abstract)

Widely used compilers like GCC usually have hundreds of optimizations controlled by optimization flags, which can be enabled or disabled during compilation to improve the runtime performance of a compiled program. Due to the large number of optimization flags and their combination, it is difficult for compiler users to tune compiler optimization flags manually. In the literature, many auto-tuning techniques have been proposed, which find a desired setting on all optimization flags (i.e., an optimization sequence) by designing different search strategies in the entire optimization space. Due to the huge search space, these techniques suffer from the widely-recognized efficiency problem. To reduce the search space, in this paper, we propose a critical-flag selection based approach CFSCA which first finds flags potentially relevant to the target program by analyzing program structure and compiler documentation, and then identifies critical flags through statistical analysis on the program's predicted runtime performance with various optimization sequences. With the reduced search space, CFSCA selects a desired optimization sequence. To evaluate the performance of the proposed approach CFSCA, we conduct an extensive experimental study on the latest version of the compiler GCC with a widely used benchmark cBench. The experimental results show that CFSCA significantly outperforms the four compared techniques, including the state-of-art technique BOCA.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{ZhuH23,
  title = {Compiler Auto-Tuning via Critical Flag Selection},
  author = {Mingxuan Zhu and Dan Hao},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00209}
}