Abstract
We here present new insights of properties of real-life interference graphs emerging in register allocation. These new insights imply good hopes for a possibility of improving the coloring approach towards optimal solutions. The conclusions are based on measurements of nearly 28,000 real instances of such interference graphs. All the instances explored are determined to possess the so-called 1-perfectness property, a fact that seems to make them easy to color optimally. The exact algorithms presented not only produce better solutions than the traditional heuristic methods, but also, indeed, seem to perform surprisingly fast, according to the measurements on our implementations.
Chapter PDF
Similar content being viewed by others
Keywords
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
Andrew W. Appel and Lal George. Sample graph coloring problems. Available online at http://www.cs.princeton.edu/~appel/graphdata/, 1996. 27,921 actual register-interference graphs generated by Standard ML of New Jersey version 1.09, compiling itself.
Daniel Brélaz. New methods to color the vertices of a graph. Communications of the ACM, 22(4):251–256, April 1979.
Preston Briggs, Keith D. Cooper, and Linda Torczon. Improvements to graph coloring register allocation. ACM Transactions on Programming Languages and Systems, 16(3):428–455, May 1994.
G. J. Chaitin. Register allocation and spilling via graph coloring. In Proceedings of the ACM SIGPLAN’ 82 Symposium on Compiler Construction, pages 98–105, Boston, Massachusetts, June 1982. The Association for Computing Machinery.
Fred C. Chow and John L. Hennessy. Register allocation by priority-based coloring. In Proceedings of the ACM SIGPLAN’ 84 Symposium on Compiler Construction, pages 222–232, Montreal, June 1984. The Association for Computing Machinery.
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. The MIT Press, Massachusetts Institute of Technology, Cambridge, Massachusetts 02142, second edition, 2001.
Olivier Coudert. Exact coloring of real-life graphs is easy. In Proceedings of the 34th annual conference on Design automation conference, pages 121–126, Anaheim, CA USA, June 1997. The Association for Computing Machinery.
Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, New York, 1979.
Lal George and Andrew W. Appel. Iterated register coalescing. In Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 208–218, St. Petersburg Beach, FL USA, January 1996. The Association for Computing Machinery.
Lal George and Andrew W. Appel. Iterated register coalescing. ACM Transactions on Programming Languages and Systems, 18(3):300–324, May 1996.
Martin Grötschel, László Lovász, and Alexander Schrijver. Geometric Algorithms and Combinatorial Optimization. Springer-Verlag, Berlin Heidelberg, Germany, 1988.
Alfred Bray Kempe. On the geographical problem of the four colours. American Journal of Mathematics, 2:193–201, 1879.
Robert Kennedy, Sun Chan, Shin-Ming Liu, Raymond Lo, Peng Tu, and Fred Chow. Partial redundancy elimination in SSA form. ACM Transactions on Programming Languages and Systems, 21(3):627–676, May 1999.
Luděk Kučera. Combinatorial Algorithms. Adam Hilger, Redcliff Way, Bristol BS1 6NX, England, 1990.
Luděk Kučera. The greedy coloring is a bad probabilistic algorithm. Journal of Algorithms, 12(4):674–684, December 1991.
Jonathan S. Turner. Almost all k-colorable graphs are easy to color. Journal of Algorithms, 9(1):63–82, March 1988.
Steven R. Vegdahl. Using node merging to enhance graph coloring. In Proceedings of the ACM SIGPLAN’ 99 conference on Programming language design and implementation, pages 150–154, Atlanta, GA USA, May 1999. The Association for Computing Machinery.
Mark N. Wegman and F. Kenneth Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13(2):181–210, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Andersson, C. (2003). Register Allocation by Optimal Graph Coloring. In: Hedin, G. (eds) Compiler Construction. CC 2003. Lecture Notes in Computer Science, vol 2622. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36579-6_3
Download citation
DOI: https://doi.org/10.1007/3-540-36579-6_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00904-7
Online ISBN: 978-3-540-36579-2
eBook Packages: Springer Book Archive