MLGO: a Machine Learning Guided Compiler Optimizations Framework
Not on the map. Why?
Abstract (arXiv)
Leveraging machine-learning (ML) techniques for compiler optimizations has been widely studied and explored in academia. However, the adoption of ML in general-purpose, industry strength compilers has yet to happen. We propose MLGO, a framework for integrating ML techniques systematically in an industrial compiler -- LLVM. As a case study, we present the details and results of replacing the heuristics-based inlining-for-size optimization in LLVM with machine learned models. To the best of our knowledge, this work is the first full integration of ML in a complex compiler pass in a real-world setting. It is available in the main LLVM repository. We use two different ML algorithms: Policy Gradient and Evolution Strategies, to train the inlining-for-size model, and achieve up to 7% size reduction, when compared to state of the art LLVM -Oz. The same model, trained on one corpus, generalizes well to a diversity of real-world targets, as well as to the same set of targets after months of active development. This property of the trained models is beneficial to deploy ML techniques in real-world settings.
Key facts. Cited by 40 papers in the map (data through 7 Oct 2026). Builds on 8 of its 33 references that are in the map. First posted on arXiv 13 Jan 2021.
Builds on
8 of 33 references.
References · 8
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2017Inductive Representation Learning on Large Graphscited by 6,284
- 2013Playing Atari with Deep Reinforcement Learningcited by 3,211
- 2017Evolution Strategies as a Scalable Alternative to Reinforcement Learningcited by 555
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2018Learning to Optimize Tensor Programscited by 138
- 2018Structured Evolution with Compact Architectures for Scalable Policy Optimizationcited by 48
- 2019NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learningcited by 37
Built on by
Citing papers per year: 2021: 4; 2022: 6; 2023: 7; 2024: 8; 2025: 6; 2026: 9.
40 papers.
Sort:
By area:
- 2022Reincarnating Reinforcement Learning: Reusing Prior Computation to Accelerate Progresscited by 63
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2024Efficient Expert Pruning for Sparse Mixture-of-Experts Language Models: Enhancing Performance and Reducing Inference Costscited by 51
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2025STARK: Strategic Team of Agents for Refining Kernelscited by 23
- 2022Compiler Optimization for Quantum Computing Using Reinforcement Learningcited by 11
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2025Regularized Langevin Dynamics for Combinatorial Optimizationcited by 10
- 2022MLGOPerf: An ML Guided Inliner to Optimize Performancecited by 9
- 2022GRANITE: A Graph Neural Network Model for Basic Block Throughput Estimationcited by 9
- 2024Compiler generated feedback for Large Language Modelscited by 9
28 more
- 2024SORREL: Suboptimal-Demonstration-Guided Reinforcement Learning for Learning to Branchcited by 9
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimizationcited by 6
- 2021A Reinforcement Learning Environment for Polyhedral Optimizationscited by 5
- 2022Learning to Combine Instructions in LLVM Compilercited by 4
- 2022RL4ReAl: Reinforcement Learning for Register Allocationcited by 4
- 2021Generating GPU Compiler Heuristics using Reinforcement Learningcited by 3
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Servingcited by 3
- 2026Agentic Harness for Real-World Compilerscited by 3
- 2021Profile Guided Optimization without Profiles: A Machine Learning Approachcited by 2
- 2023Power Constrained Autotuning using Graph Neural Networkscited by 2
- 2024Offline Imitation Learning from Multiple Baselines with Applications to Compiler Optimizationcited by 2
- 2023Target-independent XLA optimization using Reinforcement Learningcited by 1
- 2023LoopTune: Optimizing Tensor Computations with Reinforcement Learningcited by 1
- 2024Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!cited by 1
- 2025VeriLocc: End-to-End Cross-Architecture Register Allocation via LLMcited by 1
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Orderingcited by 1
- 2026AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolvecited by 1
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuningcited by 1
- 2023ML-driven Hardware Cost Model for MLIRcited by 0
- 2023The Next 700 ML-Enabled Compiler Optimizationscited by 0
- 2024A Research Agenda for Usability and Generalisation in Reinforcement Learningcited by 0
- 2025QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Codecited by 0
- 2025A Deep Learning Model for Predicting Transformation Legalitycited by 0
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolutioncited by 0
- 2026Can Large Language Models Recover Semantic Optimization Opportunities That Compilers Miss?cited by 0
- 2026CompileRover: Revolutionizing Virtual Machine Compiler Optimization with a Tri-Role LLM-Driven Frameworkcited by 0
- 2026MQSS-Selector: RL-Guided Pass Selection for an MLIR Compilation Pipelinecited by 0
- 2026Self-Evolving Coding Agents: From Digital Programs to Physical-World Intelligencecited by 0
- 2026Self-Evolving Coding Agents: From Digital Programs to Physical-World Intelligence28 Sep 2026
- 2026MQSS-Selector: RL-Guided Pass Selection for an MLIR Compilation Pipeline24 Sep 2026
- 2026Can Large Language Models Recover Semantic Optimization Opportunities That Compilers Miss?4 Aug 2026
- 2026CompileRover: Revolutionizing Virtual Machine Compiler Optimization with a Tri-Role LLM-Driven Framework21 Jul 2026
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning18 Jun 2026
- 2026AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolve28 May 2026
- 2026Agentic Harness for Real-World Compilers20 Mar 2026
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolution3 Mar 2026
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Ordering5 Feb 2026
- 2025A Deep Learning Model for Predicting Transformation Legality8 Nov 2025
- 2025QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Code3 Nov 2025
- 2025STARK: Strategic Team of Agents for Refining Kernels19 Oct 2025
28 more
- 2025VeriLocc: End-to-End Cross-Architecture Register Allocation via LLM20 Jun 2025
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving2 Jun 2025
- 2025Regularized Langevin Dynamics for Combinatorial Optimization1 Feb 2025
- 2024A Research Agenda for Usability and Generalisation in Reinforcement Learning22 Dec 2024
- 2024SORREL: Suboptimal-Demonstration-Guided Reinforcement Learning for Learning to Branch20 Dec 2024
- 2024Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!11 Dec 2024
- 2024Efficient Expert Pruning for Sparse Mixture-of-Experts Language Models: Enhancing Performance and Reducing Inference Costs1 Jul 2024
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimization27 Jun 2024
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimization24 Apr 2024
- 2024Offline Imitation Learning from Multiple Baselines with Applications to Compiler Optimization28 Mar 2024
- 2024Compiler generated feedback for Large Language Models18 Mar 2024
- 2023The Next 700 ML-Enabled Compiler Optimizations17 Nov 2023
- 2023Large Language Models for Compiler Optimization11 Sep 2023
- 2023LoopTune: Optimizing Tensor Computations with Reinforcement Learning4 Sep 2023
- 2023Target-independent XLA optimization using Reinforcement Learning28 Aug 2023
- 2023Power Constrained Autotuning using Graph Neural Networks22 Feb 2023
- 2023ML-driven Hardware Cost Model for MLIR14 Feb 2023
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Prediction9 Jan 2023
- 2022Compiler Optimization for Quantum Computing Using Reinforcement Learning8 Dec 2022
- 2022GRANITE: A Graph Neural Network Model for Basic Block Throughput Estimation8 Oct 2022
- 2022MLGOPerf: An ML Guided Inliner to Optimize Performance18 Jul 2022
- 2022Reincarnating Reinforcement Learning: Reusing Prior Computation to Accelerate Progress3 Jun 2022
- 2022RL4ReAl: Reinforcement Learning for Register Allocation5 Apr 2022
- 2022Learning to Combine Instructions in LLVM Compiler22 Feb 2022
- 2021Profile Guided Optimization without Profiles: A Machine Learning Approach24 Dec 2021
- 2021Generating GPU Compiler Heuristics using Reinforcement Learning23 Nov 2021
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Research17 Sep 2021
- 2021A Reinforcement Learning Environment for Polyhedral Optimizations28 Apr 2021
- 2025STARK: Strategic Team of Agents for Refining Kernelscited by 23
- 2026Agentic Harness for Real-World Compilerscited by 3
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuningcited by 1
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolutioncited by 0
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning18 Jun 2026
- 2026Agentic Harness for Real-World Compilers20 Mar 2026
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolution3 Mar 2026
- 2025STARK: Strategic Team of Agents for Refining Kernels19 Oct 2025
- 2022Reincarnating Reinforcement Learning: Reusing Prior Computation to Accelerate Progresscited by 63
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2022Compiler Optimization for Quantum Computing Using Reinforcement Learningcited by 11
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2025Regularized Langevin Dynamics for Combinatorial Optimizationcited by 10
- 2022MLGOPerf: An ML Guided Inliner to Optimize Performancecited by 9
- 2022GRANITE: A Graph Neural Network Model for Basic Block Throughput Estimationcited by 9
- 2024Compiler generated feedback for Large Language Modelscited by 9
- 2021A Reinforcement Learning Environment for Polyhedral Optimizationscited by 5
- 2022Learning to Combine Instructions in LLVM Compilercited by 4
12 most cited of 28 All 28 (JSON)
- 2026MQSS-Selector: RL-Guided Pass Selection for an MLIR Compilation Pipeline24 Sep 2026
- 2026Can Large Language Models Recover Semantic Optimization Opportunities That Compilers Miss?4 Aug 2026
- 2026CompileRover: Revolutionizing Virtual Machine Compiler Optimization with a Tri-Role LLM-Driven Framework21 Jul 2026
- 2026AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolve28 May 2026
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Ordering5 Feb 2026
- 2025A Deep Learning Model for Predicting Transformation Legality8 Nov 2025
- 2025VeriLocc: End-to-End Cross-Architecture Register Allocation via LLM20 Jun 2025
- 2025Regularized Langevin Dynamics for Combinatorial Optimization1 Feb 2025
- 2024A Research Agenda for Usability and Generalisation in Reinforcement Learning22 Dec 2024
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimization27 Jun 2024
- 2024Compiler generated feedback for Large Language Models18 Mar 2024
- 2023The Next 700 ML-Enabled Compiler Optimizations17 Nov 2023
12 newest of 28 All 28 (JSON)