Abstract
In a previous paper we reported the successful use of graph coloring techniques for doing global register allocation in an experimental PL/I optimizing compiler. When the compiler cannot color the register conflict graph with a number of colors equal to the number of available machine registers, it must add code to spill and reload registers to and from storage. Previously the compiler produced spill code whose quality sometimes left much to be desired, and the ad hoe techniques used took considerable amounts of compile time. We have now discovered how to extend the graph coloring approach so that it naturally solves the spilling problem. Spill decisions are now made on the basis of the register conflict graph and cost estimates of the value of keeping the result of a computation in a register rather than in storage. This new approach produces better object code and takes much less compile time.
- 1 "The 801 minicomputer," G. Radin, Proceedings of the ACM Symposium on Architectural Support for Programming Languages and Operating Systems, March 1-3, 1982, Palo Alto, California. Google ScholarDigital Library
- 2 "The history of language processor technology in IBM," F.E. Allen, IBM Journal of Research and Development 25 (1981), pp. 535-548.Google ScholarDigital Library
- 3 "Measurement of code improvement algorithms," J. Cocke, P.W. Markstein, Information Processing 80, S.H. Lavington (ed.), North-Holland, Amsterdam, 1980, pp. 221-228.Google Scholar
- 4 "Register allocation via coloring," G.J. Chaitin, M.A. Auslander, A.K. Chandra, J. Cocke, M.E. Hopkins, P.W. Markstein, Computer Languages 6 (1981), pp. 47-57.Google ScholarCross Ref
- 5 "Optimization of range checking," V. Markstein, J. Cocke, P. Markstein, this Proceedings.Google Scholar
- 6 "Higher Level Programming: Introduction to the Use of the Set-Theoretic Programming Language SETL," R.B.K. Dewar, E. Schonberg, J.T. Schwartz, Courant Institute, New York University, 1981.Google Scholar
Index Terms
- Register allocation & spilling via graph coloring
Recommendations
Register allocation and spilling via graph coloring
20 Years of the ACM SIGPLAN Conference on Programming Language Design and Implementation 1979-1999: A SelectionIn a previous paper we reported the successful use of graph coloring techniques for doing global register allocation in an experimental PL/I optimizing compiler. When the compiler cannot color the register conflict graph with a number of colors equal to ...
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 ...
Register allocation & spilling via graph coloring
SIGPLAN '82: Proceedings of the 1982 SIGPLAN symposium on Compiler constructionIn a previous paper we reported the successful use of graph coloring techniques for doing global register allocation in an experimental PL/I optimizing compiler. When the compiler cannot color the register conflict graph with a number of colors equal to ...
Comments