Search papers, labs, and topics across Lattice.
This paper systematically evaluates the ability of agents to patch missed optimizations in compilers, revealing that effective patching requires generalization beyond the specific cases reported. By constructing a benchmark of real-world LLVM missed optimization issues, the authors compare agent-generated patches to those created by developers, finding that while agents can optimize examples, their patches often fall short in scope or diverge from developer intentions. The introduction of historical-knowledge augmentation techniques demonstrates improved alignment with developer goals and practical benefits in real-world scenarios.
Agents can optimize compiler missed cases, but often miss the broader context, leading to incomplete or misaligned patches.
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.