---
title: "基于智能体的编译器遗漏优化补丁研究"
source: "arXiv AI/CL/LG（论文）"
source_tier: "t2"
url: "https://arxiv.org/abs/2607.02370v1"
permalink: "https://feed.astralor.com/items/itm_d9fcb110e60c9ce816c7708a"
published: "2026-07-02T16:12:32.000Z"
score: 56
channel: "ai"
tags: ["LLVM","历史知识增强","智能体","编译器优化","补丁生成"]
---

# 基于智能体的编译器遗漏优化补丁研究

## 速览

该论文系统研究了AI智能体修复编译器遗漏优化的能力，构建了基于LLVM真实问题的基准，发现智能体生成的补丁常仅覆盖部分开发者意图范围或过度泛化。作者提出历史知识增强技术（检索与蒸馏），利用先前的优化拉取请求显著提升了补丁的泛化对齐效果，并在实际IR上验证了实用性。

## 关键点

- 编译器遗漏优化补丁需要泛化到类似案例而非仅修复单个问题。
- AI智能体生成的补丁在优化范围上常与开发者意图存在偏差（部分覆盖或过度泛化）。
- 通过检索和蒸馏历史LLVM优化拉取请求可改善补丁的泛化对齐效果。

## 全文

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.

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_d9fcb110e60c9ce816c7708a
