Large Language Models for Compiler Optimization
Not on the map. Why?
Abstract (arXiv)
We explore the novel application of Large Language Models to code optimization. We present a 7B-parameter transformer model trained from scratch to optimize LLVM assembly for code size. The model takes as input unoptimized assembly and outputs a list of compiler options to best optimize the program. Crucially, during training, we ask the model to predict the instruction counts before and after optimization, and the optimized code itself. These auxiliary learning tasks significantly improve the optimization performance of the model and improve the model's depth of understanding. We evaluate on a large suite of test programs. Our approach achieves a 3.0% improvement in reducing instruction counts over the compiler, outperforming two state-of-the-art baselines that require thousands of compilations. Furthermore, the model shows surprisingly strong code reasoning abilities, generating compilable code 91% of the time and perfectly emulating the output of the compiler 70% of the time.
Key facts. Cited by 52 papers in the map (data through 7 Oct 2026). Builds on 46 of its 67 references that are in the map. First posted on arXiv 11 Sep 2023.
Builds on
46 of 67 references.
References · 46
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
34 more
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,338
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2023StarCoder: may the source be with you!cited by 790
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2022PAL: Program-aided Language Modelscited by 635
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2023Textbooks Are All You Needcited by 561
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2023SantaCoder: don't reach for the stars!cited by 169
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2022A Length-Extrapolatable Transformercited by 123
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
- 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
- 2022Code Translation with Compiler Representationscited by 42
- 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
- 2023SLaDe: A Portable Small Language Model Decompiler for Optimized Assemblycited by 28
- 2020AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learningcited by 24
- 2023Limits for Learning with Language Modelscited by 17
- 2022Beyond the C: Retargetable Decompilation using Neural Machine Translationcited by 15
- 2018Machine Learning in Compiler Optimisationcited by 13
- 2021Automated Conformance Testing for JavaScript Engines via Deep Compiler Fuzzingcited by 12
- 2021Learning C to x86 Translation: An Experiment in Neural Compilationcited by 12
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2022MLGOPerf: An ML Guided Inliner to Optimize Performancecited by 9
Built on by
Citing papers per year: 2023: 1; 2024: 20; 2025: 19; 2026: 12.
52 papers.
Sort:
By area:
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systemscited by 108
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Surveycited by 82
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2024How Far Are We From AGI: Are LLMs All We Need?cited by 31
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizercited by 25
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checkingcited by 23
- 2024The Landscape and Challenges of HPC Research and LLMscited by 22
- 2024UniCoder: Scaling Code Large Language Model via Universal Codecited by 18
38 more
- 2024See What LLMs Cannot Answer: A Self-Challenge Framework for Uncovering LLM Weaknessescited by 15
- 2024How Multimodal Integration Boost the Performance of LLM for Optimization: Case Study on Capacitated Vehicle Routing Problemscited by 12
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
- 2024Compiler generated feedback for Large Language Modelscited by 9
- 2024Priority Sampling of Large Language Models for Compilerscited by 8
- 2024LLM-Aided Compilation for Tensor Acceleratorscited by 8
- 2025Towards the Worst-case Robustness of Large Language Modelscited by 7
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learningcited by 7
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimizationcited by 6
- 2026Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolvecited by 5
- 2025Improving Existing Optimization Algorithms with LLMscited by 4
- 2025VecTrans: Enhancing Compiler Auto-Vectorization through LLM-Assisted Code Transformationscited by 4
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Frameworkcited by 4
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimizationcited by 4
- 2026InCoder-32B-Thinking: Industrial Code World Model for Thinkingcited by 4
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Servingcited by 3
- 2024MIREncoder: Multi-modal IR-based Pretrained Embeddings for Performance Optimizationscited by 2
- 2024ViC: Virtual Compiler Is All You Need For Assembly Code Searchcited by 2
- 2025Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Modelscited by 2
- 2024Tadashi: Enabling AI-Based Automated Code Generation With Guaranteed Correctnesscited 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
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTscited by 1
- 2025LOOPRAG: Enhancing Loop Transformation Optimization with Retrieval-Augmented Large Language Modelscited by 1
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Orderingcited by 1
- 2024Green Runner: A tool for efficient deep learning component selectioncited by 0
- 2024The why, what, and how of AI-based coding in scientific researchcited by 0
- 2025Data-efficient Performance Modeling via Pre-trainingcited by 0
- 2025Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Predictioncited by 0
- 2025QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Codecited by 0
- 2025Exploring the Feasibility of End-to-End Large Language Model as a Compilercited by 0
- 2026Rudder: Steering Prefetching in Distributed GNN Training using LLM Agentscited by 0
- 2026LLM Translation of Compiler Intermediate Representationcited by 0
- 2026Step-TP: A Grounded, Step-Level Dataset with Chain-of-Thought Reasoning for LLM-Guided Tensor Program Optimizationcited by 0
- 2026TensorBench: Benchmarking Coding Agents on a Compiler-Based Tensor Frameworkcited by 0
- 2026AgentCompile: An LLM-Guided Compiler for Direct CUDA Inferencecited by 0
- 2026Can Coding Agents Implement Missed Compiler Optimizations? Evaluating LLM Agents on LLVM Peephole Optimizationscited by 0
- 2026Position: Quantum Program Generation Must Prioritize Validity Over Probabilistic Scalingcited by 0
50 most cited of 52 All 52 (JSON)
- 2026Detecting Soft Errors in Parallel Software with LLM-tuned Instruction Duplication17 Sep 2026
- 2026AtumAI: A Principled Framework for Agentic Generation of Datacenter Control-Plane Policies3 Aug 2026
- 2026Position: Quantum Program Generation Must Prioritize Validity Over Probabilistic Scaling15 Jul 2026
- 2026Can Coding Agents Implement Missed Compiler Optimizations? Evaluating LLM Agents on LLVM Peephole Optimizations2 Jul 2026
- 2026AgentCompile: An LLM-Guided Compiler for Direct CUDA Inference4 Jun 2026
- 2026TensorBench: Benchmarking Coding Agents on a Compiler-Based Tensor Framework4 Jun 2026
- 2026Step-TP: A Grounded, Step-Level Dataset with Chain-of-Thought Reasoning for LLM-Guided Tensor Program Optimization25 May 2026
- 2026LLM Translation of Compiler Intermediate Representation7 May 2026
- 2026InCoder-32B-Thinking: Industrial Code World Model for Thinking3 Apr 2026
- 2026Rudder: Steering Prefetching in Distributed GNN Training using LLM Agents26 Feb 2026
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Ordering5 Feb 2026
- 2026Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve28 Jan 2026
38 more
- 2025Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models19 Dec 2025
- 2025LOOPRAG: Enhancing Loop Transformation Optimization with Retrieval-Augmented Large Language Models12 Dec 2025
- 2025Exploring the Feasibility of End-to-End Large Language Model as a Compiler6 Nov 2025
- 2025QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly Code3 Nov 2025
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization1 Nov 2025
- 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
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving2 Jun 2025
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning30 May 2025
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Accelerators24 May 2025
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systems12 Apr 2025
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMs5 Apr 2025
- 2025VecTrans: Enhancing Compiler Auto-Vectorization through LLM-Assisted Code Transformations25 Mar 2025
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking18 Feb 2025
- 2025Improving Existing Optimization Algorithms with LLMs12 Feb 2025
- 2025Towards the Worst-case Robustness of Large Language Models31 Jan 2025
- 2025Data-efficient Performance Modeling via Pre-training24 Jan 2025
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Survey29 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
- 2024SelfCodeAlign: Self-Alignment for Code Generation31 Oct 2024
- 2024Tadashi: Enabling AI-Based Automated Code Generation With Guaranteed Correctness4 Oct 2024
- 2024The why, what, and how of AI-based coding in scientific research3 Oct 2024
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024See What LLMs Cannot Answer: A Self-Challenge Framework for Uncovering LLM Weaknesses16 Aug 2024
- 2024ViC: Virtual Compiler Is All You Need For Assembly Code Search10 Aug 2024
- 2024LLM-Aided Compilation for Tensor Accelerators6 Aug 2024
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?19 Jul 2024
- 2024MIREncoder: Multi-modal IR-based Pretrained Embeddings for Performance Optimizations2 Jul 2024
- 2024UniCoder: Scaling Code Large Language Model via Universal Code24 Jun 2024
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizer7 Jun 2024
- 2024How Far Are We From AGI: Are LLMs All We Need?16 May 2024
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimization24 Apr 2024
- 2024Compiler generated feedback for Large Language Models18 Mar 2024
- 2024How Multimodal Integration Boost the Performance of LLM for Optimization: Case Study on Capacitated Vehicle Routing Problems4 Mar 2024
- 2024Priority Sampling of Large Language Models for Compilers28 Feb 2024
- 2024The Landscape and Challenges of HPC Research and LLMs3 Feb 2024
50 newest of 52 All 52 (JSON)
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learningcited by 7
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Frameworkcited by 4
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimizationcited by 4
- 2026Rudder: Steering Prefetching in Distributed GNN Training using LLM Agentscited by 0
- 2026TensorBench: Benchmarking Coding Agents on a Compiler-Based Tensor Frameworkcited by 0
- 2026Can Coding Agents Implement Missed Compiler Optimizations? Evaluating LLM Agents on LLVM Peephole Optimizationscited by 0
- 2026AtumAI: A Principled Framework for Agentic Generation of Datacenter Control-Plane Policiescited by 0
- 2026AtumAI: A Principled Framework for Agentic Generation of Datacenter Control-Plane Policies3 Aug 2026
- 2026Can Coding Agents Implement Missed Compiler Optimizations? Evaluating LLM Agents on LLVM Peephole Optimizations2 Jul 2026
- 2026TensorBench: Benchmarking Coding Agents on a Compiler-Based Tensor Framework4 Jun 2026
- 2026Rudder: Steering Prefetching in Distributed GNN Training using LLM Agents26 Feb 2026
- 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization1 Nov 2025
- 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework13 Oct 2025
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning30 May 2025
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systemscited by 108
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checkingcited by 23
- 2026InCoder-32B-Thinking: Industrial Code World Model for Thinkingcited by 4
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Servingcited by 3
- 2024Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!cited by 1
- 2026Step-TP: A Grounded, Step-Level Dataset with Chain-of-Thought Reasoning for LLM-Guided Tensor Program Optimizationcited by 0
- 2026Position: Quantum Program Generation Must Prioritize Validity Over Probabilistic Scalingcited by 0
- 2026Position: Quantum Program Generation Must Prioritize Validity Over Probabilistic Scaling15 Jul 2026
- 2026Step-TP: A Grounded, Step-Level Dataset with Chain-of-Thought Reasoning for LLM-Guided Tensor Program Optimization25 May 2026
- 2026InCoder-32B-Thinking: Industrial Code World Model for Thinking3 Apr 2026
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving2 Jun 2025
- 2025A Survey of Frontiers in LLM Reasoning: Inference Scaling, Learning to Reason, and Agentic Systems12 Apr 2025
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking18 Feb 2025
- 2024Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!11 Dec 2024
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Surveycited by 82
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMscited by 57
- 2024How Far Are We From AGI: Are LLMs All We Need?cited by 31
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizercited by 25
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 2024The Landscape and Challenges of HPC Research and LLMscited by 22
- 2024UniCoder: Scaling Code Large Language Model via Universal Codecited by 18
- 2024See What LLMs Cannot Answer: A Self-Challenge Framework for Uncovering LLM Weaknessescited by 15
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Acceleratorscited by 12
- 2024Compiler generated feedback for Large Language Modelscited by 9
12 most cited of 32 All 32 (JSON)
- 2026Detecting Soft Errors in Parallel Software with LLM-tuned Instruction Duplication17 Sep 2026
- 2026LLM Translation of Compiler Intermediate Representation7 May 2026
- 2026Protean Compiler: An Agile Framework to Drive Fine-grain Phase Ordering5 Feb 2026
- 2026Magellan: Autonomous Discovery of Novel Compiler Optimization Heuristics with AlphaEvolve28 Jan 2026
- 2025Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models19 Dec 2025
- 2025Exploring the Feasibility of End-to-End Large Language Model as a Compiler6 Nov 2025
- 2025Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction15 Oct 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025Autocomp: A Powerful and Portable Code Optimizer for Tensor Accelerators24 May 2025
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2025OpenCodeInstruct: A Large-scale Instruction Tuning Dataset for Code LLMs5 Apr 2025
- 2025VecTrans: Enhancing Compiler Auto-Vectorization through LLM-Assisted Code Transformations25 Mar 2025
12 newest of 32 All 32 (JSON)
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
- 2024Optimizing High-Level Synthesis Designs with Retrieval-Augmented Large Language Models
- 2026LiteCoOp: Lightweight Multi-LLM Shared-Tree Reasoning for Model-Serving Compiler Optimizations
- 2025Can Large Language Models Understand Intermediate Representations in Compilers?
- 2025Small Language Models as Compiler Experts: Auto-Parallelization for Heterogeneous Systems
- 2026AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning
- 2025LPO: Discovering Missed Peephole Optimizations with Large Language Models
- 2025LLM4VV: Evaluating Cutting-Edge LLMs for Generation and Evaluation of Directive-Based Parallel Programming Model Compiler Tests ↗