Abstract
We describe an improvement to a heuristic introduced by Chaitin for use in graph coloring register allocation. Our modified heuristic produces better colorings, with less spill code. It has similar compile-time and implementation requirements. We present experimental data to compare the two methods.
- J. W. Backus, R. J. Beeber, S. Best, R. Goldberg, L. M. Haibt, H. L. Herrick, R. A. Nelson, D. Sayre, P. B. Sheridan, H. Stern, I. Ziller, R. A. Hughes, and R. Nutt. The FORTRAN automatic coding system. In Proceedings of the Western Joint Computer Conference, pages 188--198. Institute of Radio Engineers, NY, NY, USA, Feb. 1957.Google ScholarDigital Library
- P. Bergner, P. Dahl, D. Engebretsen, and M. O'Keefe. Spill code minimization via interference region spilling. SIGPLAN Notices, 32(6):287--295, June 1997. Proceedings of the ACM SIGPLAN '97 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- 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. SIGPLAN Notices, 24(7):258--263, July 1989. Proceedings of the ACM SIGPLAN '89 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- P. Briggs, K. D. Cooper, and L. Torczon. Coloring register pairs. ACM Letters on Programming Languages and Systems, 1(1):3--13, Mar. 1992. Google ScholarDigital Library
- P. Briggs, K. D. Cooper, and L. Torczon. Rematerialization. SIGPLAN Notices, 27(7):311--321, July 1992. Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- P. Briggs and L. Torczon. An efficient representation for sparse sets. ACM Letters on Programming Languages and Systems, 2(1--4):45--58, March--December 1993. Google ScholarDigital Library
- D. Callahan and B. Koblenz. Register allocation via hierarchical graph coloring. SIGPLAN Notices, 26(6):192--203, June 1991. Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- G. J. Chaitin. Register allocation and spilling via graph coloring. SIGPLAN Notices, 17(6):98--105, June 1982. Proceedings of the ACM SIGPLAN '82 Symposium on Compiler Construction. Google ScholarDigital Library
- G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P. W. Markstein. Register allocation via graph coloring. Computer Languages, 6(1):47--57, Jan. 1981.Google ScholarDigital Library
- J.-D. Choi, R. Cytron, and J. Ferrante. Automatic construction of sparse data flow evaluation graphs. In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, pages 55--66, Orlando, FL, USA, Jan. 1991. Google ScholarDigital Library
- F. C. Chow and J. L. Hennessy. Register allocation by priority-based coloring. SIGPLAN Notices, 19(6):222--232, June 1984. Proceedings of the ACM SIGPLAN '84 Symposium on Compiler Construction. Google ScholarDigital Library
- K. D. Cooper, T. J. Harvey, and L. Torczon. How to build an interference graph. Software---Practice and Experience, 28(4):425--444, Apr. 1998. Google ScholarDigital Library
- K. D. Cooper and L. T. Simpson. Live range splitting in a graph coloring register allocator. In Proceedings of the Seventh International Compiler Construction Conference, CC '98, Lecture Notes in Computer Science 1383, pages 174--187, 1998. Google ScholarDigital Library
- L. George and A. W. Appel. Iterated register coalescing. ACM Transactions on Programming Languages and Systems, 18(3):300--324, May 1996. Google ScholarDigital Library
- R. Gupta, M. L. Soffa, and T. Steele. Register allocation via clique separators. SIGPLAN Notices, 24(7):264--274, July 1989. Proceedings of the ACM SIGPLAN '89 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- J. R. Larus and P. N. Hilfinger. Register allocation in the SPUR Lisp compiler. SIGPLAN Notices, 21(7):255--263, July 1986. Proceedings of the ACM SIGPLAN '86 Symposium on Compiler Construction. Google ScholarDigital Library
- S. S. Lavrov. Store economy in closed operator schemes. Journal of Computational Mathematics and Mathematical Physics, 1(4):687--701, 1961. English translation in U.S.S.R. Computational Mathematics and Mathematical Physics 3:810--828, 1962.Google Scholar
- D. Matula and L. Beck. Smallest-last ordering and clustering and graph coloring algorithms. Technical Report CSE-8104, Department of Computer Science and Engineering, Southern Methodist University, July 1981.Google Scholar
- B. R. Nickerson. Graph coloring register allocation for processors with multi-register operands. SIGPLAN Notices, 25(6):40--52, June 1990. Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- C. Norris and L. L. Pollock. Register allocation over the program dependence graph. SIGPLAN Notices, 29(6):266--277, June 1994. Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation. Google ScholarDigital Library
- J. Park and S.-M. Moon. Optimistic register coalescing. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques (PACT), pages 196--204. IEEE, 1998. Google ScholarDigital Library
- {AuHo 82} M. Auslander and M. Hopkins. An overview of the PL.8 compiler. Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices 17(6), June, 1982. Google ScholarDigital Library
- {CCHK 87} A. Carle, K. D. Cooper, R. T. Hood, K. Kennedy, L. Torczon, and S. K. Warren. A practical environment for scientific programming. IEEE Computer 20(11), November, 1987. Google ScholarDigital Library
- {CeDT 84} M. R. Celis, J. E. Dennis, and R. A. Tapia. A trust region strategy for equality constrained optimization. In Numerical Optimization 1984 (P. T. Boggs, R. H. Byrd, and R. B. Schnabel, editors), SIAM, 1984.Google Scholar
- {Chai 82} G. J. Chaitin. Register allocation and spilling via graph coloring. Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices 17(6), June, 1982. Google ScholarDigital Library
- {CACC 81} G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P. W. Markstein. Register allocation via coloring. Computer Languages 6, January, 1981.Google Scholar
- {Chow 83} F. Chow. A portable machine-independent global optimizer---design and measurements. PhD. Thesis. Technical Note No. 83--254, Computer Systems Laboratory, Stanford University, Dec. 1983. Google ScholarDigital Library
- {ChHe 84} F. Chow and J. Hennessy. Register allocation by priority based coloring. Proceedings of the SIGPLAN '84 Symposium on Compiler Construction, SIGPLAN Notices 19(6), June, 1984. Google ScholarDigital Library
- {CoKT 86} K. D. Cooper, K. Kennedy, and L. Torczon. The impact of interprocedural analysis and optimization in the IRn programming environment. ACM Transactions on Programming Languages and Systems 8(4), October, 1986. Google ScholarDigital Library
- {DBMS 82} J. J. Dongarra, J. R. Bunch, C. B. Moler, and G. W. Stewart. LINPACK Users' Guide, SIAM, Philadelphia, PA., 1982.Google Scholar
- {Dong 83} J. J. Dongarra. Performance of various computers using standard linear equations software in a Fortran environment. Argonne National Laboratory Technical Memorandum 23, August 1983 and subsequent revisions.Google ScholarDigital Library
- {FoMM 77} G. E. Forsythe, M. A. Malcolm, and C. B. Moler. Computer Methods for Mathematical Computations, Prentice-Hall, Inc., Englewood Cliffs, NJ, 1977. Google ScholarDigital Library
- {LaHi 86} J. R. Larus and P. N. Hilfinger. Register allocation in the SPUR Lisp compiler. Proceedings of the SIGPLAN '86 Symposium on Compiler Construction, SIGPLAN Notices 21(7), June, 1986. Google ScholarDigital Library
- {MaBe 81} D. Matula and L. Beck. Smallest-last ordering and clustering and graph coloring algorithms. TR CSE 8104, Dept. of Computer Science and Engineering, Southern Methodist University, Dallas, TX, July, 1981.Google Scholar
- {Torc 89} V. J. Torczon. Nonlinear optimization by parallel searches on simplex edges. PhD. Thesis, Department of Mathematical Sciences, Rice University, Houston, TX, expected May, 1989.Google Scholar
- {Wirt 76} N. Wirth. Algorithms + Data Structures = Programs. Prentice-Hall, Inc., Englewood Cliffs, NJ, 1976. Google ScholarDigital Library
Index Terms
- Coloring heuristics for register allocation
Recommendations
Coloring heuristics for register allocation
Proceedings of the SIGPLAN '89 symposium on Interpreters and interpretive techniquesWe describe an improvement to a heuristic introduced by Chaitin for use in graph coloring register allocation. Our modified heuristic produces better colorings, with less spill code. It has similar compile-time and implementation requirements. We ...
Improvements to graph coloring register allocation
We describe two improvements to Chaitin-style graph coloring register allocators. The first, optimistic coloring, uses a stronger heuristic to find a k-coloring for the interference graph. The second extends Chaitin's treatment of rematerialization to ...
Coloring-based coalescing for graph coloring register allocation
CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimizationGraph coloring register allocation tries to minimize the total cost of spilled live ranges of variables. Live-range splitting and coalescing are often performed before the coloring to further reduce the total cost. Coalescing of split live ranges, ...
Comments