Archer:面向编译器优化的智能代码审查
Archer: Towards Agentic Review for Compiler Optimizations
AI总结:
针对编译器优化代码审查能力不足的问题,提出首个自动化智能审查工具Archer,通过义务引导分析和确定性验证守卫,在LLVM上发现21%的开放PR和11%的已关闭PR存在语义错误。
摘要:
现代编译器频繁更新,但专家审查能力极为有限,导致集成延迟,有时甚至将微妙的语义错误引入编译器代码库。使用现代通用代码审查代理自动化代码审查流程可能是可行的,但由于编译器复杂性,它面临关键挑战。在本文中,我们以LLVM为目标编译器,提出了Archer,这是首个面向编译器优化的自动化智能代码审查工具。Archer通过使用义务引导分析以及确定性验证守卫(仅接受有可执行证据支持的发现)来约束智能审查过程的两端。我们在过去两个月的LLVM中评估了70个开放PR和328个已关闭PR。审查结果令人震惊且值得关注:Archer发现21%的开放PR和11%的已关闭PR存在错误,即引入了语义错误,例如LLVM中的错误编译。我们的发现暴露了大型编译器项目中关键审查能力的差距,并展示了Archer作为额外审查者的实用价值。
英文摘要:
Modern compilers are frequently updated, but expert review capacity is highly limited, leading to delayed integration and, in some cases, subtle semantic bugs entering the compiler codebase. Automating the code review process with modern general code review agents may be feasible, but it faces critical challenges due to compiler complexity. In this paper, we use LLVM as our target compiler and present Archer, the first automated agentic code review tool for compiler optimizations. Archer constrains the agentic review process from both ends by using obligations to guide analysis and a deterministic validation guard to admit only findings backed by executable evidence. We evaluated Archer on 70 open PRs and 328 closed PRs in LLVM from the last two months. The review results are shocking and concerning: Archer discovers that 21% of open PRs and 11% of closed PRs are buggy, i.e, introducing semantic bugs such as miscompilations in LLVM. Our findings expose a critical gap in the capacity for critical review in large compiler projects and demonstrate the practical value of Archer as an additional reviewer.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。