Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning
Haolin Pan, Hongyu Lin, Haoran Luo, Yang Liu, Kaichun Yao, Libo Zhang, Mingjie Xing, Yanjun Wu
摘要
Compiler auto-tuning optimizes pass sequences to improve performance metrics such as Intermediate Representation (IR) instruction count. Although recent advances leveraging Large Language Models (LLMs) have shown promise in automating compiler tuning, two significant challenges still remain: the absence of high-quality reasoning datasets for agents training, and limited effective interactions with the compilation environment. In this work, we introduce Compiler-R1, the first reinforcement learning (RL)-driven framework specifically augmenting LLM capabilities for compiler auto-tuning. Compiler-R1 features a curated, high-quality reasoning dataset and a novel two-stage end-to-end RL training pipeline, enabling efficient environment exploration and learning through an outcome-based reward. Extensive experiments across seven datasets demonstrate Compiler-R1 achieving an average 8.46% IR instruction count reduction compared to opt -Oz, showcasing the strong potential of RL-trained LLMs for compiler optimization. Our code and datasets are publicly available at https://github.com/Panhaolin2001/Compiler-R1.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization 引用了 Efficient Compiler Autotuning via Bayesian Optimization
- ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization 引用了 Learning Compiler Pass Orders using Coreset and Normalized Value Prediction
- Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction 引用了 Efficient Compiler Autotuning via Bayesian Optimization
引用它的顶会 Paper4
- TuneAgent: Agentic Operating System Kernel Tuning with Reinforcement LearningHongyu Lin, Yuchen Li, Haoran Luo, Zhenghong Lin 等KDD 2026 · 3 次引用
- ECCO: Evidence-Driven Causal Reasoning for Compiler OptimizationHaolin Pan, Lianghong Huang, Dong Jinyuan, Mingjie Xing 等ICML 2026 · 2 次引用
- Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization PredictionHaolin Pan, Dong Jinyuan, Hongbin Zhang, Hongyu Lin 等ICLR 2026
- CIRBench: Evaluating Large Language Models as LLVM IR OptimizersZi Yang, Haifeng Ding, Fei Liu, Yingying Cheng 等ICML 2026
它引用的 Paper6
- Sample Efficient Reinforcement Learning with REINFORCEJunzi Zhang, Jongho Kim, Brendan O'Donoghue, Stephen P. BoydAAAI 2021 · 162 次引用
- Efficient Compiler Autotuning via Bayesian OptimizationJunjie Chen, Ningxin Xu, Peiqi Chen, Hongyu ZhangICSE 2021 · 73 次引用
- Graph-R1: Towards Agentic GraphRAG Framework via End-to-end Reinforcement LearningHaoran Luo, Haihong E, Guanting Chen, Qika Lin 等ICML 2026 · 50 次引用
- MetaSpatial: Reinforcing 3D Spatial Reasoning in VLMs for the MetaverseZhenyu Pan, Han LiuICLR 2026 · 49 次引用
- Learning Compiler Pass Orders using Coreset and Normalized Value PredictionYouwei Liang, Kevin Stone, Ali Shameli, Chris Cummins 等ICML 2023 · 26 次引用
相关 Paper
- Retro-R1: LLM-based Agentic RetrosynthesisWei Liu, Jiangtao Feng, Hongli Yu, Yuxuan Song 等NeurIPS 2025 · 8 次引用
- Select2Reason: Efficient Instruction-Tuning Data Selection for Long-CoT ReasoningCehao Yang, Xueyuan Lin, Xiaojun Wu, Chengjin Xu 等ACL Findings 2026 · 1 次引用
- Learning from Synthetic Data Improves Multi-hop ReasoningAnmol Kabra, Yilun Yin, Albert Gong, Kamilė Stankevičiūtė 等ICLR 2026 · 6 次引用
- QiMeng-CodeV-R1: Reasoning-Enhanced Verilog GenerationYaoyu Zhu, Di Huang, Han-Qi Lyu, Xiaoyun Zhang 等NeurIPS 2025 · 46 次引用
- PerfDojo: Automated ML Library Generation for Heterogeneous ArchitecturesAndrei Ivanov, Siyuan Shen, Gioele Gottardo, Marcin Chrapek 等SC 2025 · 2 次引用
