Combinatorial Register Allocation and Instruction Scheduling
Roberto Casta\~neda Lozano, Mats Carlsson, Gabriel Hjort Blindell, and, Christian Schulte

TL;DR
This paper presents Unison, a practical combinatorial optimization approach for register allocation and instruction scheduling that improves code quality and scales to medium-sized functions, outperforming traditional compiler methods.
Contribution
It is the first to practically leverage combinatorial optimization for complete program transformations in compiler design, integrated with LLVM and capable of handling larger functions.
Findings
Unison generates better code than LLVM across multiple architectures.
It scales to functions with up to 946 instructions, surpassing previous methods.
Estimated speedups range from 1.1% to 10%, with code size reductions of 1.3% to 3.8%.
Abstract
This paper introduces a combinatorial optimization approach to register allocation and instruction scheduling, two central compiler problems. Combinatorial optimization has the potential to solve these problems optimally and to exploit processor-specific features readily. Our approach is the first to leverage this potential in practice: it captures the complete set of program transformations used in state-of-the-art compilers, scales to medium-sized functions of up to 1000 instructions, and generates executable code. This level of practicality is reached by using constraint programming, a particularly suitable combinatorial optimization technique. Unison, the implementation of our approach, is open source, used in industry, and integrated with the LLVM toolchain. An extensive evaluation confirms that Unison generates better code than LLVM while scaling to medium-sized functions. The…
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.
