atlas

Research map / Large language models / Agents, code and math

Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning

NeurIPS 2025 · Large language models › Agents, code and math · approach: LLM-guided program synthesis · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Compiler-R1 trains Qwen2.5-Instruct LLM agents for LLVM pass-sequence auto-tuning with SFT cold-start on a synthesized tool-use dataset followed by outcome-reward RL (GRPO, PPO, REINFORCE++).

Problem

LLM-based compiler auto-tuning lacks high-quality reasoning/tool-use training data and suffers from limited interaction with the compilation environment, leading to poor generalization to unseen programs.

Approach

A two-stage pipeline: SFT on simulated thought-tool-answer trajectories built from synergistic pass pairs and graph-guided sequence search, then on-policy RL with a composite format and outcome (IR instruction count reduction over unoptimized code) reward, letting the agent interact with instrcount and find_best_pass_sequence tools.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use GRPO-based interactive RL training instead of direct SFT pass predictionQwen2.5-7B-Instruct compiler tuner · seven test suites (average)OverOz (%): 4.66 -> 8.46Helped
Use GRPO-7B instead of OpenTunercompiler auto-tuning · seven test suites (average)OverOz (%): 6.09 -> 8.46Helped
Increase model scale from GRPO-1.5B to GRPO-7BCompiler-R1 · seven test suites (average)OverOz (%): 3.87 -> 8.46Helped
Remove RL fine-tuning and use SFT-only training (ablation)Qwen-1.5B interactive compiler agent · 335 test programs; repetition penalty 1.05task success rate (%): 83.36 -> 26.98Hurt
Add SFT initialization before GRPO rather than training with RL only (ablation)Qwen-1.5B interactive compiler agent · 335 test programs; repetition penalty 1.05task success rate (%): 22.55 -> 83.36Helped
Increase repetition penalty from 1.05 to 1.10 (ablation)Compiler-R1 GRPO-7B · 335 test programstask success rate (%): 51.92 -> 96.71Helped
Use AutoPhase features instead of raw LLVM IR as input (ablation)SFT-Qwen-1.5B · 100 held-out functions; N=40OverOrig: 0.4795 -> 0.4837No clear effect
Use greedy decoding instead of single-shot sampled decoding (ablation)SFT compiler tuner · Experiment 3 held-out functions; N=1OverOrigHelped
Increase SFT sampling budget from N=1 to N=40 (ablation)SFT-Qwen-7B · seven test suites (average)OverOz (%): -14.78 -> 4.66Helped
Use GRPO-3B instead of GRPO-1.5BCompiler-R1 · seven test suites (average)OverOz (%): 3.87 -> 5.12Helped
Use PPO-LSTM instead of PPO-noLSTM (ablation)AutoPhase · seven test suites (average)OverOz (%): -50.35 -> 1.24Helped

Surprising findings

Limitations

Experimental setup

Datasets: CompilerGym LLVM datasets (six training datasets) cbench-v1 chstone-v0 mibench-v1 npb-v0 blas opencv tensorflow

Benchmarks: blas cbench chstone mibench npb opencv tensorflow

Metrics: OverOz % IR instruction count reduction task success rate OverOrig time per program

Baselines: opt -Oz OpenTuner GA TPE RIO CompTuner BOCA AutoPhase (PPO-LSTM) AutoPhase (PPO-noLSTM) SFT-only Qwen

Builds on: DeepSeek-R1 PPO GRPO REINFORCE++ AutoPhase CompilerGym

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy