CompilerDream: Learning a Compiler World Model for General Code Optimization
Chaoyi Deng, Jialong Wu, Ningya Feng, Jianmin Wang, Mingsheng Long
摘要
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 fixed pass sequences, current methods to find the optimal sequence for specific programs either employ impractically slow search algorithms or learning methods that struggle to generalize to code unseen during training. To address these challenges, we introduce CompilerDream, the first world-model-based approach for general code optimization. CompilerDream features a compiler world model with a reward smoothing technique, enabling accurate simulation of optimization processes. Built on this model, code optimization agents can then be constructed via value prediction or direct optimization sequence generation. Trained on a large-scale program dataset, these agents serve as versatile code optimizers across diverse application scenarios and source-code languages. Our extensive experiments 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 state-of-the-art methods in both settings of value prediction and end-to-end code optimization. 1
• Computing methodologies → Machine learning; Model development and analysis; • Software and its engineering → Compilers.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- 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
它引用的顶会 Paper10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 被引用 64,255 次
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 被引用 47,906 次
- Dream to Control: Learning Behaviors by Latent ImaginationDanijar Hafner, Timothy P. Lillicrap, Jimmy Ba, Mohammad NorouziICLR 2020 · 被引用 1,852 次
- Mastering Atari with Discrete World ModelsDanijar Hafner, Timothy P. Lillicrap, Mohammad Norouzi, Jimmy BaICLR 2021 · 被引用 1,170 次
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler 等ICML 2021 · 被引用 140 次
相关 Paper
- Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement LearningHaolin Pan, Hongyu Lin, Haoran Luo, Yang Liu 等NeurIPS 2025 · 被引用 14 次
- Learning Compiler Pass Orders using Coreset and Normalized Value PredictionYouwei Liang, Kevin Stone, Ali Shameli, Chris Cummins 等ICML 2023 · 被引用 26 次
- Reinforced Genetic Algorithm Learning for Optimizing Computation GraphsAditya Paliwal, Felix Gimeno, Vinod Nair, Yujia Li 等ICLR 2020 · 被引用 70 次
- Bayesian Code Diffusion for Efficient Automatic Deep Learning Program OptimizationIsu Jeong, Seulki LeeOSDI 2025
- CompileAgent: Automated Real-World Repo-Level Compilation with Tool-Integrated LLM-based Agent SystemLi Hu, Guoqiang Chen, Xiuwei Shang, Shaoyin Cheng 等ACL 2025
