Learning to Combine Instructions in LLVM Compiler
Sandya Mannarswamy, Dibyendu Das

TL;DR
This paper introduces a Neural Instruction Combiner (NIC) that uses neural sequence-to-sequence models to replace traditional instruction combining in LLVM, reducing manual effort and improving optimization efficiency.
Contribution
First implementation of a neural instruction combiner integrated into a full compiler pipeline, with a new dataset and demonstrating high accuracy and feasibility.
Findings
NIC achieves 72% exact match with traditional IC
BLEU score of 0.94 indicating high translation quality
Feasible integration into production compiler pipeline
Abstract
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · Parallel Computing and Optimization Techniques · Machine Learning and Data Classification
