Revisiting Graph Coloring Register Allocation: A Study of the Chaitin-Briggs and Callahan-Koblenz Algorithms
Keith Cooper, Anshuman Dasgupta, and Jason Eckhardt

Abstract:

Techniques for global register allocation via graph coloring have been extensively studied and widely implemented in compiler frameworks. This paper examines a particular variant - the Callahan Koblenz allocator - and compares it to the Chaitin-Briggs graph coloring register allocator. Both al- gorithms were published in the 1990's, yet the academic literature does not contain an assessment of the Callahan-Koblenz allocator. This paper evaluates and contrasts the allocation decisions made by both algorithms. In particular, we focus on two key differences between the allocators: Spill code: The Callahan-Koblenz allocator attempts to minimize the effect of spill code by using program structure to guide allocation and spill code place- ment. We evaluate the impact of this strategy on allocated code. Copy elimination: Effective register-to-register copy removal is important for producing good code. The allocators use different techniques to eliminate these copies. We compare the mechanisms and provide insights into the relative per- formance of the contrasting techniques. The Callahan-Koblenz allocator may potentially insert extra branches as part of the allocation process. We also measure the performance overhead due to these branches.

Published:

"Revisiting Graph Coloring Register Allocation: A Study of the Chaitin-Briggs and Callahan-Koblenz Algorithms"
By Keith Cooper, Anshuman Dasgupta, and Jason Eckhardt.
Proceedings of the Workshop on Languages and Compilers for Parallel Computing (LCPC'05), Hawthorne, NY, October 20-22, 2005

Download: