Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
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.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 12 of its 32 references that are in the map. First posted on arXiv 30 May 2025.
Builds on
12 of 32 references.
References · 12
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2020Sample Efficient Reinforcement Learning with REINFORCEcited by 86
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2018A Survey on Compiler Autotuning using Machine Learningcited by 40
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2020AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learningcited by 24
- 2025KBQA-o1: Agentic Knowledge Base Question Answering with Monte Carlo Tree Searchcited by 22
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2023Compiler Auto-tuning through Multiple Phase Learningcited by 5
- 2024Finding Missed Code Size Optimizations in Compilers using LLMscited by 5
Built on by
Citing papers per year: 2025: 3; 2026: 4.
7 papers.
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Frameworkcited by 4
- 2025R1-Fuzz: Specializing Language Models for Textual Fuzzing via Reinforcement Learningcited by 1
- 2026PassNet: Scaling Large Language Models for Graph Compiler Pass Generationcited by 1
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuningcited by 1
- 2025Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Predictioncited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026ECCO: Evidence-Driven Causal Reasoning for Compiler Optimizationcited by 0
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning18 Jun 2026
- 2026PassNet: Scaling Large Language Models for Graph Compiler Pass Generation28 May 2026
- 2026ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization23 Jan 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction15 Oct 2025
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework13 Oct 2025
- 2025R1-Fuzz: Specializing Language Models for Textual Fuzzing via Reinforcement Learning21 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimization
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Survey
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning
- 2026CodeMidas: Scaling Agentic Coding RL Environments from Code Itself
- 2025R1-Code-Interpreter: LLMs Reason with Code via Supervised and Multi-stage Reinforcement Learning
- 2026WarmTuner: Program-Specific Warm Starts for Compiler Autotuning via Offline-to-Online Reinforcement Learning ↗
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedback
- 2026RLPF: Reinforcement Learning from Performance Feedback for Code Generation