Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve

Hongzheng Chen, Alexander Novikov, Ngân Vũ, Hanna Alam, Zhiru Zhang +3 more
1/28/2026
cs.AIcs.LGcs.PL

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2026magellan,
  title  = {Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve},
  author = {Hongzheng Chen and Alexander Novikov and Ngân Vũ and Hanna Alam and Zhiru Zhang and Aiden Grossman and Mircea Trofin and Amir Yazdanbakhsh},
  year   = {2026},
  eprint = {2601.21096},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.21096v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.21096.svg)](https://codeofpaper.com/paper/2601.21096)

Discussion