Abstract
Recent work has shown that the subtasks of register allocation (spilling, register assignment, and coalescing) can be completely separated. This work presents an algorithm for the coalescing subproblem that relies on this separation. The algorithm uses 0/1 Linear Programming (ILP), a general-purpose optimization technique, to derive optimal solutions.
We provide the first optimal solutions for a benchmark called “Optimal Coalescing Challenge”, i.e., our ILP model outperforms previous approaches. Additionally, we use these optimal solutions to assess the quality of well-known heuristics. A second benchmark on SPEC CPU2000 programs emphasizes the practicality of our algorithm.
Chapter PDF
Similar content being viewed by others
Keywords
- Integer Linear Programming
- Chordal Graph
- Integer Linear Programming Model
- Integer Linear Programming Formulation
- Register Allocation
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Chaitin, G.J.: Register allocation & spilling via graph coloring. In: SIGPLAN symposium on Compiler construction, Boston, Massachusetts, United States, ACM Press, New York (1982)
Briggs, P., Cooper, K.D., Torczon, L.: Improvements to graph coloring register allocation. ACM Trans. Program. Lang. Syst. 16(3) (1994), doi:10.1145/177492.177575
George, L., Appel, A.: Iterated Register Coalescing. ACM TOPLAS 18(3) (1996), doi:10.1145/229542.229546
Park, J., Moon, S.-M.: Optimistic Register Coalescing. ACM TOPLAS 26(4) (2004), doi:10.1145/1011508.1011512
Goos, G., Hack, S., Grund, D.: Register Allocation for Programs in SSA-Form. In: Mycroft, A., Zeller, A. (eds.) CC 2006 and ETAPS 2006. LNCS, vol. 3923, pp. 247–262. Springer, Heidelberg (2006)
Appel, A., George, L.: Optimal Spilling for CISC Machines with Few Registers. Technical report, Princeton University (2000)
Appel, A.: Optimal Coalescing Challenge (2000), http://www.cs.princeton.edu/~appel/coalesce
Hack, S.: Register Allocation for Programs in SSA-Form (to appear). PhD thesis, University of Karlsruhe (2006)
Schrijver, A.: Theory of Linear and Integer Programming. J. Wiley & Sons, Chichester (1986)
Nemhauser, G.L., Wolsey, L.A.: Integer and Combinatorial Optimization. Wiley-Interscience, New York (1988)
Hack, S., Grund, D., Goos, G.: Towards Register Allocation for Programs in SSA-form. Technical report, University of Karlsruhe (2005)
Biró, M., Hujter, M., Tuza, Z.: Precoloring extension. I. Interval graphs. Discrete Mathematics 100 (1992)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman, New York (1979)
Gavril, F.: Algorithms for Minimum Coloring, Maximum Clique, Minimum Covering by Cliques, and Independent Set of a Chordal Graph. SIAM Journal on Computing 1(2) (1972)
Appel, A., George, L.: Optimal Spilling for CISC Machines with Few Registers. In: ACM SIGPLAN Conference PLDI (2001)
Standard Performance Evaluation Corp. (2000), http://www.spec.org/cpu2000/
Lindenmaier, G., et al.: Firm, an Intermediate Language for Compiler Research. Technical Report 2005-8, University of Karlsruhe (2005)
Goodwin, D.W., Wilken, K.D.: Optimal and Near-optimal Global Register Allocations Using 0-1 Integer Programming. Softw. Pract. Exper. 26(8) (1996)
Fu, C., Wilken, K.: A Faster Optimal Register Allocator. In: Proceedings of the ACM/IEEE international symposium on Microarchitecture, Istanbul, Turkey, IEEE Computer Society Press, Los Alamitos (2002)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Grund, D., Hack, S. (2007). A Fast Cutting-Plane Algorithm for Optimal Coalescing. In: Krishnamurthi, S., Odersky, M. (eds) Compiler Construction. CC 2007. Lecture Notes in Computer Science, vol 4420. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71229-9_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-71229-9_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71228-2
Online ISBN: 978-3-540-71229-9
eBook Packages: Computer ScienceComputer Science (R0)