Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!
On the map: LLM reasoning → Test-time compute and efficient thinking
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated great potential in various language processing tasks, and recent studies have explored their application in compiler optimizations. However, all these studies focus on the conventional open-source LLMs, such as Llama2, which lack enhanced reasoning mechanisms. In this study, we investigate the errors produced by the fine-tuned 7B-parameter Llama2 model as it attempts to learn and apply a simple peephole optimization for the AArch64 assembly code. We provide an analysis of the errors produced by the LLM and compare it with state-of-the-art OpenAI models which implement advanced reasoning logic, including GPT-4o and GPT-o1 (preview). We demonstrate that OpenAI GPT-o1, despite not being fine-tuned, outperforms the fine-tuned Llama2 and GPT-4o. Our findings indicate that this advantage is largely due to the chain-of-thought reasoning implemented in GPT-o1. We hope our work will inspire further research on using LLMs with enhanced reasoning mechanisms and chain-of-thought for code generation and optimization.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Test-time compute and efficient thinking, one of 17 directions in LLM reasoning. Builds on 31 of its 47 references that are in the map. First posted on arXiv 11 Dec 2024.
Builds on
31 of 47 references.
References · 31
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2024GPT-4o System Cardcited by 4,588
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2017Decoupled Weight Decay Regularizationcited by 1,831
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2023StarCoder: may the source be with you!cited by 799
19 more
- 2024Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Surveycited by 656
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 274
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 256
- 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulatorcited by 123
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 103
- 2024OpenR: An Open Source Framework for Advanced Reasoning with Large Language Modelscited by 94
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2021MLGO: a Machine Learning Guided Compiler Optimizations Frameworkcited by 40
- 2024LLM4Decompile: Decompiling Binary Code with Large Language Modelscited by 39
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2023SLaDe: A Portable Small Language Model Decompiler for Optimized Assemblycited by 28
- 2023Refining Decompiled C Code with Large Language Modelscited by 24
- 2018Machine Learning in Compiler Optimisationcited by 13
- 2021Learning C to x86 Translation: An Experiment in Neural Compilationcited by 12
- 2023Learning Compiler Pass Orders using Coreset and Normalized Value Predictioncited by 11
- 2024WaDec: Decompiling WebAssembly Using Large Language Modelcited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving
- 2025GPO: Learning from Critical Steps to Improve LLM Reasoning
- 2025LLMSR@XLLM25: An Empirical Study of LLM for Structural Reasoning
- 2025LPO: Discovering Missed Peephole Optimizations with Large Language Models
- 2025V-Seek: Accelerating LLM Reasoning on Open-hardware Server-class RISC-V Platforms
- 2024LLMOPT: Learning to Define and Solve General Optimization Problems from Scratch
- 2026OPT-Engine: Benchmarking the Limits of LLMs in Optimization Modeling via Complexity Scaling
- 2024LLM Reasoners: New Evaluation, Library, and Analysis of Step-by-Step Reasoning with Large Language Models