arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.14292cs.SE
收藏

一种混合的、知识引导的进化框架,用于个性化编译器自动调优

A Hybrid, Knowledge-Guided Evolutionary Framework for Personalized Compiler Auto-Tuning

Hangzhou Institute for Advanced Study at UCAS(中国科学院大学杭州高等研究院);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学)

Haolin Pan, Hongbin Zhang, Mingjie Xing, Yanjun Wu

AI总结:

提出混合知识引导进化框架,利用离线知识库和定制遗传算子,在线个性化优化编译器遍序列,在七个数据集上平均额外减少11.0% LLVM IR指令。

摘要:

编译器遍(pass)自动调优对于提升软件性能至关重要,然而为特定程序寻找最优的遍序列是一个NP难问题。传统的通用优化标志(如-O3和-Oz)采用一刀切的方法,往往无法充分挖掘程序的性能潜力。为应对这一挑战,我们提出了一种新颖的混合的、知识引导的进化框架。该框架利用从大规模离线分析阶段提取的知识,智能地引导在线个性化优化。在离线阶段,我们构建了一个全面的编译知识库,由四个关键组件组成:(1)遍行为向量,用于定量捕捉每个优化的有效性;(2)基于行为相似性对这些向量进行聚类得到的遍组;(3)一个协同遍图,用于建模有益的序列交互;以及(4)为不同程序类型进化出的原型遍序列库。在线阶段,一个定制化的遗传算法通过专门设计的、注入知识(knowledge-infused)的遗传算子利用这一丰富的知识库。这些算子通过执行语义感知的重组和有针对性的修复性变异,转变了搜索过程。在七个公开数据集上,我们的框架相较于高度优化的opt -Oz基线,平均额外实现了11.0%的LLVM IR指令减少,展示了其在发现个性化、高性能优化序列方面的最先进能力。

英文摘要:

Compiler pass auto-tuning is critical for enhancing software performance, yet finding the optimal pass sequence for a specific program is an NP-hard problem. Traditional, general-purpose optimization flags like -O3 and -Oz adopt a one-size-fits-all approach, often failing to unlock a program's full performance potential. To address this challenge, we propose a novel Hybrid, Knowledge-Guided Evolutionary Framework. This framework intelligently guides online, personalized optimization using knowledge extracted from a large-scale offline analysis phase. During the offline stage, we construct a comprehensive compilation knowledge base composed of four key components: (1) Pass Behavioral Vectors to quantitatively capture the effectiveness of each optimization; (2) Pass Groups derived from clustering these vectors based on behavior similarity; (3) a Synergy Pass Graph to model beneficial sequential interactions; and (4) a library of Prototype Pass Sequences evolved for distinct program types. In the online stage, a bespoke genetic algorithm leverages this rich knowledge base through specially designed, knowledge-infused genetic operators. These operators transform the search by performing semantically-aware recombination and targeted, restorative mutations. On a suite of seven public datasets, our framework achieves an average of 11.0% additional LLVM IR instruction reduction over the highly-optimized opt -Oz baseline, demonstrating its state-of-the-art capability in discovering personalized, high-performance optimization sequences.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑