2001/05/01 by Andrew W. Appel, Lal George · 9 citations
Computer Science · Mathematics · #Parallel Computing and Optimization Techniques #Interconnection Networks and Systems #Complexity and Algorithms in Graphs #Register allocation #Computer science #Heuristics #Register (sociolinguistics) #Parallel computing #Iterated function #Processor register #Pentium #Graph coloring #Integer programming #Code (set theory) #Algorithm #Graph #Theoretical computer science #Mathematics #Programming language #Compiler #Operating system
paper · doi:10.1145/378795.378854
openalex publication_date 2001/05/01 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/29
Many graph-coloring register-allocation algorithms don't work well for machines with few registers. Heuristics for live-range splitting are complex or suboptimal; heuristics for register assignment rarely factor the presence of fancy addressing modes; these problems are more severe the fewer registers there are to work with. We show how to optimally split live ranges and optimally use addressing modes, where the optimality condition measures dynamically weighted loads and stores but not register-register moves. Our algorithm uses integer linear programming but is much more efficient than previous ILP-based approaches to register allocation. We then show a variant of Park and Moon's optimistic coalescing algorithm that does a very good (though not provably optimal) job of removing the register-register moves. The result is Pentium code that is 9.5% faster than code generated by SSA-based splitting with iterated register coalescing.