arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.21096cs.AIcs.LGcs.PL
收藏

Magellan:利用AlphaEvolve自主发现新型编译器优化启发式方法

Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve

Google(谷歌);Google DeepMind(谷歌DeepMind);Cornell University(康奈尔大学)

Hongzheng Chen, Alexander Novikov, Ngân Vũ, Hanna Alam, Zhiru Zhang, Aiden Grossman, Mircea Trofin, Amir Yazdanbakhsh

AI总结:

Magellan通过AlphaEvolve自主发现新型编译器优化启发式方法,提升编译器优化效率与性能。

摘要:

现代编译器依赖人工设计的启发式方法来指导优化过程。这些人工设计的规则往往难以适应现代软件和硬件的复杂性,导致维护负担大。为了解决这一挑战,我们提出了Magellan,一个代理框架,通过合成可执行的C++决策逻辑来进化编译器过程本身。Magellan将LLM编码代理与进化搜索和自动调优结合,在生成、在用户提供的宏基准上评估以及细化的闭环中进行。产生紧凑的启发式方法,直接整合到现有编译器中。在多个生产优化任务中,Magellan发现的策略能够匹配或超越专家基线。在LLVM函数内联中,Magellan合成的新启发式方法在二进制大小缩减和端到端性能方面均优于数十年的手工工程。在寄存器分配中,它学习了一种简洁的优先规则,用于处理活跃范围,该规则在大规模工作负载上与复杂的人工设计策略相匹配。我们还报告了在XLA问题上的初步结果,展示了在LLVM之外的可移植性,且工程努力减少。

英文摘要:

Modern compilers rely on hand-crafted heuristics to guide optimization passes. These human-designed rules often struggle to adapt to the complexity of modern software and hardware and lead to high maintenance burden. To address this challenge, we present Magellan, an agentic framework that evolves the compiler pass itself by synthesizing executable C++ decision logic. Magellan couples an LLM coding agent with evolutionary search and autotuning in a closed loop of generation, evaluation on user-provided macro-benchmarks, and refinement, producing compact heuristics that integrate directly into existing compilers. Across several production optimization tasks, Magellan discovers policies that match or surpass expert baselines. In LLVM function inlining, Magellan synthesizes new heuristics that outperform decades of manual engineering for both binary-size reduction and end-to-end performance. In register allocation, it learns a concise priority rule for live-range processing that matches intricate human-designed policies on a large-scale workload. We also report preliminary results on XLA problems, demonstrating portability beyond LLVM with reduced engineering effort.

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

↑