CompilerDream: Learning a Compiler World Model for General Code Optimization
On the map: World models → World models for language agents
Abstract (arXiv)
Effective code optimization in compilers is crucial for computer and software engineering. The success of these optimizations primarily depends on the selection and ordering of the optimization passes applied to the code. While most compilers rely on a fixed sequence of optimization passes, current methods to find the optimal sequence either employ impractically slow search algorithms or learning methods that struggle to generalize to code unseen during training. We introduce CompilerDream, a model-based reinforcement learning approach to general code optimization. CompilerDream comprises a compiler world model that accurately simulates the intrinsic properties of optimization passes and an agent trained on this model to produce effective optimization strategies. By training on a large-scale program dataset, CompilerDream is equipped to serve as a general code optimizer across various application scenarios and source-code languages. Our extensive experiments first highlight CompilerDream's strong optimization capabilities for autotuning, where it leads the CompilerGym leaderboard. More importantly, the zero-shot generalization ability of large-scale trained compiler world model and agent, excels across diverse datasets, surpassing LLVM's built-in optimizations and other state-of-the-art methods in both settings of value prediction and end-to-end code optimization.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 31 of its 66 references that are in the map. First posted on arXiv 24 Apr 2024.
Builds on
31 of 66 references.
Closest ancestors · 1
Same direction, newest first
- 2020Language Models are Few-Shot Learners28 May
Other references · 30
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2016Asynchronous Methods for Deep Reinforcement Learningcited by 2,218
- 2019Dream to Control: Learning Behaviors by Latent Imaginationcited by 1,598
- 2019Mastering Atari, Go, Chess and Shogi by Planning with a Learned Modelcited by 1,327
- 2023Mastering Diverse Domains through World Modelscited by 1,193
- 2018Soft Actor-Critic Algorithms and Applicationscited by 1,179
- 2020Mastering Atari with Discrete World Modelscited by 990
- 2018IMPALA: Scalable Distributed Deep-RL with Importance Weighted Actor-Learner Architecturescited by 866
- 2018Recurrent World Models Facilitate Policy Evolutioncited by 761
18 more
- 2019When to Trust Your Model: Model-Based Policy Optimizationcited by 753
- 2018Distributed Prioritized Experience Replaycited by 260
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2017Device Placement Optimization with Reinforcement Learningcited by 84
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2021MLGO: a Machine Learning Guided Compiler Optimizations Frameworkcited by 40
- 2019NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learningcited by 37
- 2023The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verificationcited by 32
- 2021Procedural Generalization by Planning with Self-Supervised World Modelscited by 30
- 2018A General Path-Based Representation for Predicting Program Propertiescited by 28
- 2020AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learningcited by 24
- 2023HarmonyDream: Task Harmonization Inside World Modelscited by 22
- 2021Cross-Trajectory Representation Learning for Zero-Shot Generalization in RLcited by 20
- 2020Static Neural Compiler Optimization via Deep Reinforcement Learningcited by 14
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2023DreamSmooth: Improving Model-based Reinforcement Learning via Reward Smoothingcited by 8
Built on by
Citing papers per year: 2025: 3; 2026: 3.
6 papers.
- 2025Alignment and Safety in Large Language Models: Safety Mechanisms, Training Paradigms, and Emerging Challengescited by 14
- 2025SuperCoder: Assembly Program Superoptimization with Large Language Modelscited by 5
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
- 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
- 2026CompileRover: Revolutionizing Virtual Machine Compiler Optimization with a Tri-Role LLM-Driven Frameworkcited by 0
- 2026CompileRover: Revolutionizing Virtual Machine Compiler Optimization with a Tri-Role LLM-Driven Framework21 Jul 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
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Framework28 Dec 2025
- 2025Alignment and Safety in Large Language Models: Safety Mechanisms, Training Paradigms, and Emerging Challenges25 Jul 2025
- 2025SuperCoder: Assembly Program Superoptimization with Large Language Models16 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024Should AI Optimize Your Code? A Comparative Study of Classical Optimizing Compilers Versus Current Large Language Models
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning
- 2026WarmTuner: Program-Specific Warm Starts for Compiler Autotuning via Offline-to-Online Reinforcement Learning ↗
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework
- 2026Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve
- 2021Learning to Superoptimize Real-world Programs
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning