arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.02370cs.SEcs.AI
收藏

理解基于智能体的编译器遗漏优化补丁

Understanding Agent-Based Patching of Compiler Missed Optimizations

Batu Guan, Zirui Wang, Shaohua Li

AI总结:

研究智能体如何为编译器遗漏优化打补丁,发现关键挑战在于泛化而非仅修复报告案例,提出历史知识增强技术以提升泛化能力。

摘要:

编译器遗漏优化是指编译器未能优化某些代码的情况。实现或修补此类遗漏优化需要许多编译器开发者的努力。在本文中,我们系统研究了智能体如何修补编译器遗漏优化。我们识别出一个重要挑战:修补遗漏优化不仅需要修复报告案例,还需要泛化到类似案例。我们构建了一个真实世界的LLVM遗漏优化问题基准,并从优化范围角度比较了智能体生成的补丁与开发者补丁。结果表明,编码智能体通常能优化给定示例,但许多生成的补丁要么仅覆盖开发者意图范围的一部分,要么与之部分重叠;在某些情况下,它们进一步泛化到参考补丁之外。我们进一步引入了历史知识增强技术,通过检索和蒸馏利用先前的LLVM优化拉取请求,表明这些技术改善了与开发者对齐的泛化,并在应用于真实世界IR时产生了实际效益。

英文摘要:

Compiler missed optimizations refer to cases in which compilers failed to optimize certain code. It takes many compiler developers' efforts to implement or patch such missed optimizations. In this paper, we present a systematic study of how well agents patch compiler missed optimizations. We identify a significant challenge that patching a missed optimization requires more than just fixing the reported case, and instead requires generalizing to similar cases. We construct a benchmark of real-world LLVM missed optimization issues and compare agent-generated patches with patches from developers in terms of optimization scope. Our results show that coding agents often optimize the given examples, but many generated patches either cover only part of the developer-intended scope or partially overlap with it; in some cases, they further generalize beyond the reference patch. We further introduce historical-knowledge augmentation techniques that leverage prior LLVM optimization pull requests through retrieval and distillation, showing that they improve developer-aligned generalization and yield practical benefits when applied to real-world IR.

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

↑