skip to main content
10.1145/73141.74841acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Spill code minimization techniques for optimizing compliers

Authors Info & Claims
Published:21 June 1989Publication History

ABSTRACT

Global register allocation and spilling is commonly performed by solving a graph coloring problem. In this paper we present a new coherent set of heuristic methods for reducing the amount of spill code generated. This results in more efficient (and shorter) compiled code. Our approach has been compared to both standard and priority-based coloring algorithms, universally outperforming them.

In our approach, we extend the capability of the existing algorithms in several ways. First, we use multiple heuristic functions to increase the likelihood that less spill code will be inserted. We have found three complementary heuristic functions which together appear to span a large proportion of good spill decisions. Second, we use a specially tuned greedy heuristic for determining the order of deleting (and hence coloring) the unconstrained vertices. Third, we have developed a “cleaning” technique which avoids some of the insertion of spill code in non-busy regions.

References

  1. AH82.Auslander, M.A. and Hopkins, M.E., 'An overview of the PL.8 compiler', Proceedings of the A CM Symposium on Compiler Construction (June 1982), 22-31. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B85.Bollobas, B., Random Graphs, Academic Press, London, 1985.Google ScholarGoogle Scholar
  3. B79.Brelas, D., 'New methods to color the vertices of a graph', Commun. ACM 22 (1979), 251-256. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C81.Chaitin, G.J., Auslander, M.A., Chandra, A.K., Cocke, J., Hopkins, M.E., and Markstein, P.W., 'Register allocation via coloring', Computer Languages 6 (1981), 47-57.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C82.Chaitin, G.J., *Register allocation and spilling via graph coloring', Proceedings of the A CM Symposium on Compiler Construction (June 1982), 98-105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. CH84.Chow, F., and Hennessy, J., 'Register allocation by priority-based coloring', Proceedings of the A CM Symposium on Compiler Construction (June 1984), 222-232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. DGP88.Dagan, I., Golumbic, M.C., and Pinter, R.Y., 'Trapezoid graphs and their coloring', D/screte Applied Math. 21 (1988), 35-46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G80.Golumbie, M.C., Algorithmic Graph Theory and Perfect Graphs, Academic Press, New York, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G85.Golumbic, M. C., ed., ~lnterval Graphs and Related Topics', a special issue of Discrete Math. 55 (1985), 113-243.Google ScholarGoogle Scholar
  10. LH86.Larus, J.R., and Hilfinger, P.N., 'Register allocation in the SPUR Lisp compiler', Proc~edings of the A CM Symposium on Compiler Construction (June 1986), 255-263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M72.Matula, D.W., Marble, G., and Isaacson, J.D., 'Graph coloring algorithms', in Graph Theory and Computing, (Read, R.C., ed.), Academic Press, New York, 1972.Google ScholarGoogle Scholar
  12. W86.Wall, D.W., 'Global register allocation at link time', Proceedings of the A CM Symposium on Compiler Construction (June 1986), 264-275. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Spill code minimization techniques for optimizing compliers

      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
      • Published in

        cover image ACM Conferences
        PLDI '89: Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation
        June 1989
        355 pages
        ISBN:089791306X
        DOI:10.1145/73141
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 24, Issue 7
          Proceedings of the SIGPLAN '89 symposium on Interpreters and interpretive techniques
          July 1989
          355 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/74818
          Issue’s Table of Contents

        Copyright © 1989 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 21 June 1989

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

        Upcoming Conference

        PLDI '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader