Learning to Combine Instructions in LLVM Compiler
Not on the map. Why?
Abstract (arXiv)
Instruction combiner (IC) is a critical compiler optimization pass, which replaces a sequence of instructions with an equivalent and optimized instruction sequence at basic block level. There can be thousands of instruction-combining patterns which need to be frequently updated as new coding idioms/applications and novel hardware evolve over time. This results in frequent updates to the IC optimization pass thereby incurring considerable human effort and high software maintenance costs. To mitigate these challenges associated with the traditional IC, we design and implement a Neural Instruction Combiner (NIC) and demonstrate its feasibility by integrating it into the standard LLVM compiler optimization pipeline. NIC leverages neural sequence-to-sequence (Seq2Seq) models for generating optimized encoded IR sequence from the unoptimized encoded IR sequence. To the best of our knowledge, ours is the first work demonstrating the feasibility of a neural instruction combiner built into a full-fledged compiler pipeline. Given the novelty of this task, we built a new dataset for training our NIC neural model. We show that NIC achieves exact match results percentage of 72% for optimized sequences as compared to traditional IC and neural machine translation metric Bleu precision score of 0.94, demonstrating its feasibility in a production compiler pipeline.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 12 of its 31 references that are in the map. First posted on arXiv 22 Feb 2022.
Builds on
12 of 31 references.
References · 12
- 2017Attention Is All You Needcited by 60,361
- 2016Layer Normalizationcited by 5,669
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
- 2021MLGO: a Machine Learning Guided Compiler Optimizations Frameworkcited by 40
- 2020Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesiscited by 39
- 2019NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learningcited by 37
- 2020Can Automatic Post-Editing Improve NMT?cited by 17
- 2019AutoPhase: Compiler Phase-Ordering for High Level Synthesis with Deep Reinforcement Learningcited by 12
- 2019Deep Learning-based Hybrid Graph-Coloring Algorithm for Register Allocationcited by 2
Built on by
Citing papers per year: 2022: 1; 2023: 1; 2024: 0; 2025: 0; 2026: 2.
4 papers.
- 2026AI as a Compiler: Compiling Triton kernels without the Triton compiler29 Sep 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2023ML-driven Hardware Cost Model for MLIR14 Feb 2023
- 2022MLGOPerf: An ML Guided Inliner to Optimize Performance18 Jul 2022