Advertisement

A register allocation framework based on hierarchical cyclic interval graphs

  • Laurie J. Hendren
  • Guang R. Gao
  • Erik R. Altman
  • Chandrika Mukerji
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 641)

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.

Keywords

Nest Loop Interval Graph Register Allocation Graph Coloring Problem Interference Graph 
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

  1. 1.
    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.Google Scholar
  2. 2.
    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.Google Scholar
  3. 3.
    M. Burstein. Channel Routing. In T. Ohtsuki, editor, Layout Design and Verification, pages 132–167. North-Holland, 1986.Google Scholar
  4. 4.
    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.Google Scholar
  5. 5.
    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.Google Scholar
  6. 6.
    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.Google Scholar
  7. 7.
    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.Google Scholar
  8. 8.
    I. Dagan, M.C. Golumbic, and R.Y. Pinter. Trapezoid Graphs and their Coloring. Discrete Applied Mathematics, 21:35–46, 1988.Google Scholar
  9. 9.
    J. Fabri. Automatic Storage Optimization. PhD thesis, University of Michigan, 1982.Google Scholar
  10. 10.
    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.Google Scholar
  11. 11.
    M.C. Golumbic. Interval Graphs and Related Topics. Discrete Mathematics, 55(2):113–121, 1985.Google Scholar
  12. 12.
    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.Google Scholar
  13. 13.
    J. L. Hennessy and D. A. Patterson. Computer Architecture: A Quantitative Approach. Morgan Kaufmann Publishers, Inc., 1990.Google Scholar
  14. 14.
    V. Klee. What Are the Intersection Graphs of Arcs in a Circle? American Mathematics Monthly, 76:810–813, 1969.Google Scholar
  15. 15.
    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.Google Scholar
  16. 16.
    A. Tucker. Coloring a Family of Circular Arcs. SIAM Journal of Applied Mathematics, 29(3):493–502, November 1975.Google Scholar
  17. 17.
    Alan Tucker. Applied Combinatorics. John Wiley and Sons, Inc., 2nd edition, 1984.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Laurie J. Hendren
    • 1
  • Guang R. Gao
    • 1
  • Erik R. Altman
    • 1
  • Chandrika Mukerji
    • 1
  1. 1.McGill UniversityMontréalCanada

Personalised recommendations