skip to main content
article
Free Access

Register allocation & spilling via graph coloring

Published:01 June 1982Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 "The history of language processor technology in IBM," F.E. Allen, IBM Journal of Research and Development 25 (1981), pp. 535-548.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarCross RefCross Ref
  5. 5 "Optimization of range checking," V. Markstein, J. Cocke, P. Markstein, this Proceedings.Google ScholarGoogle Scholar
  6. 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 ScholarGoogle Scholar

Index Terms

  1. Register allocation & spilling via graph coloring

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 17, Issue 6
      Proceedings of the 1982 SIGPLAN symposium on Compiler construction
      June 1982
      347 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/872726
      Issue’s Table of Contents
      • cover image ACM Conferences
        SIGPLAN '82: Proceedings of the 1982 SIGPLAN symposium on Compiler construction
        June 1982
        357 pages
        ISBN:0897910745
        DOI:10.1145/800230

      Copyright © 1982 Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 June 1982

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader