Abstract
In this paper, we present a new register allocation framework based on hierarchical cyclic interval graphs. We motivate our approach by demonstrating that cyclic interval graphs provide a feasible and effective representation to characterize sequences of live ranges of variables in successive iterations of a loop. Based on this representation we provide a new heuristic algorithm for minimum register allocation, the fat cover algorithm. In addition, we present a spilling algorithm that makes use of the extra information available in the interval graph representation. Whenever possible, it favors register floats (moving values from one register to another) over the traditional register spills (storing a spilled variable into memory).
We demonstrate the effectiveness of our approach on a collection of loops by comparing the results of our algorithm to the results produced by three state-of-the-art optimizing compilers.
This work supported in part by FCAR, NSERC, and the McGill Faculty of Graduate Studies and Research.
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
D. Bernstein, D.Q. Goldin, M.C. Golumbic, H. Krawczyk, Y. Mansour, I. Nahshon, and R.Y. Pinter. Spill Code Minimization Techniques for Optimizing Compilers. Proceedings of the 1989 SIGPLAN Conference on Programming Language Design and Implementation, 24(7):258–263, July 1989.
Preston Briggs, Keith D. Cooper, Ken Kennedy, and Linda Torczon. Coloring heuristics for register allocation. Proceedings of the 1989 SIGPLAN Conference on Programming Language Design and Implementation, 24(7):275–284, July 1989.
M. Burstein. Channel Routing. In T. Ohtsuki, editor, Layout Design and Verification, pages 132–167. North-Holland, 1986.
G. J. Chaitin, M. Auslander, A. Chandra, J. Cocke, M. Hopkins, and P. Markstein. Register allocation via coloring. Computer Languages 6, pages 47–57, January 1981.
G.J. Chaitin. Register Allocation and Spilling via Graph Coloring. In Proceedings of the ACM SIGPLAN'82 Symposium on Compiler Construction, pages 98–105. SIGPLAN Notices, June 1982.
F. Chow and J. Hennessy. Register Allocation by priority based coloring. In Proceedings of the ACM SIGPLAN'84 Symposium on Compiler Construction. SIGPLAN Notices 19(6), June 1984.
F. Chow and J. Hennessy. The Priority-Based Coloring Approach to Register Allocation. ACM Transactions on Programming Languages and Systems, 12(4):501–536, October 1990.
I. Dagan, M.C. Golumbic, and R.Y. Pinter. Trapezoid Graphs and their Coloring. Discrete Applied Mathematics, 21:35–46, 1988.
J. Fabri. Automatic Storage Optimization. PhD thesis, University of Michigan, 1982.
M.R. Garey, D.S. Johnson, G.L. Miller, and C.H. Papadimitriou. The Complexity of Coloring Circular Arcs and Chords. SIAM Journal on Algebraic and Discrete Methods, 1(2):216–227, June 1980.
M.C. Golumbic. Interval Graphs and Related Topics. Discrete Mathematics, 55(2):113–121, 1985.
Laurie J. Hendren, Guang R. Gao, Erik Altman, and Chandrika Mukerji. Register allocation using cyclic interval graphs. Technical Report ACAPS-MEMO 33, McGill University, 1991.
J. L. Hennessy and D. A. Patterson. Computer Architecture: A Quantitative Approach. Morgan Kaufmann Publishers, Inc., 1990.
V. Klee. What Are the Intersection Graphs of Arcs in a Circle? American Mathematics Monthly, 76:810–813, 1969.
P.A. Steenkiste and J. Hennessy. A Simple Interprocedural Register Allocation Algorithm and Its Effectiveness for LISP. ACM Transactions on Programming Languages and Systems, 11(1):1–32, January 1989.
A. Tucker. Coloring a Family of Circular Arcs. SIAM Journal of Applied Mathematics, 29(3):493–502, November 1975.
Alan Tucker. Applied Combinatorics. John Wiley and Sons, Inc., 2nd edition, 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hendren, L.J., Gao, G.R., Altman, E.R., Mukerji, C. (1992). A register allocation framework based on hierarchical cyclic interval graphs. In: Kastens, U., Pfahler, P. (eds) Compiler Construction. CC 1992. Lecture Notes in Computer Science, vol 641. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55984-1_17
Download citation
DOI: https://doi.org/10.1007/3-540-55984-1_17
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55984-9
Online ISBN: 978-3-540-47335-0
eBook Packages: Springer Book Archive