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

Register allocation using lazy saves, eager restores, and greedy shuffling

Authors Info & Claims
Published:01 June 1995Publication History

ABSTRACT

This paper presents a fast and effective linear intraprocedural register allocation strategy that optimizes register usage across procedure calls. It capitalizes on our observation that while procedures that do not contain calls (syntactic leaf routines) account for under one third of all procedure activations, procedures that actually make no calls (effective leaf routines) account for over two thirds of all procedure activations. Well-suited for both caller-and calle-save registers, our strategy employs a “lazy” save mechanism that avoids saves for all effective leaf routines, an “eager” restore mechanism that reduces the effect of memory latency, and a “greedy” register shuffling algorithm that does a remarkbly good job of minimizing the need for temporaries in setting up procedure calls.

References

  1. 1.Andrew W. Appel and Zhong Shao. CaUee-save registers in continuation-passing style. Lisp and Symbolic Computation, 5(3):191-221, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Anders Bondorf. Similiz Manual, System Version 5.0. DIKU, University of Copenhagen, Denmark, 1993.Google ScholarGoogle Scholar
  3. 3.Bhaskar Bose. DDD--A transformation system for Digital Design Derivation. Technical Report 331, Indiana University, Computer Science Department, May 1991.Google ScholarGoogle Scholar
  4. 4.Robert G. Burger. The Scheme Machine. Technical Report 413, Indiana University, Computer Science Department, August 1994.Google ScholarGoogle Scholar
  5. 5.G. J. Chaitin, M. A. Auslander, A. K. Cocke, M. E. Hopkins, and P. W. Markstein. Register allocation via coloring. Computer Languages, 6:47-57, 1981.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.F. Chow. Minimizing register usage penalty at procedure calls. In Proceedings o/the SIGPLAN '88 Conference on Programming Language Design and Implementation, June 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Fred C. Chow and John L. Hennessy. The prioritybased coloring approach to register allocation. Transactions on Programming Languages and Systems, 12(4):501-536, October 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.William Clinger and Jonathan Rees (editors). Revised4 report on the algorithmic language Scheme. LISP Pointers, IV(3):1-55, July-September 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.William D. Clinger and Lars Thomas Hansen. Lambda, the ultimate label, or a simple optimizing compiler for Scheme. In Proceedings of the I994 A CM Conference on LISP and Functional Programming, pages 128-139, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Richard P. Gabriel. Performance and Evaluation of LISP Systems. MIT Press series in computer systems. MIT Press, Cambridge, MA, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.Robert Hieb, R. Kent Dybvig, and Carl Bruggeman. Representing control in the presence of first-class continuations. In Proceedings of the SIGPLAN '90 Conference on Programming Language Design and Implementation, pages 66-77, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.David Kranz. Orbit' an optimizing compiler for Scheme. Technical Report 632, Yale University, Computer Science Department, 1988.Google ScholarGoogle Scholar
  13. 13.Zhong Shao and Andrew W. Appel. Space-efficient closure representations. In Proceedings of the 199~ A CM Conference on LISP and Functional Programming, pages 150-161, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.P. A. Steenkiste and J. L. Hennessy. A simple interprocedural register allocation algorithm and its effectiveness for Lisp. Transactions on Programming Languages and Systems, 11(1):1-32, January 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Andrew K. Wright and Robert Cartwright. A practical soft type system for Scheme. In Proceedings of the 199d A CM Conference on LISP and Functional Programming, pages 250-262, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Register allocation using lazy saves, eager restores, and greedy shuffling

              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 '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
                June 1995
                335 pages
                ISBN:0897916972
                DOI:10.1145/207110

                Copyright © 1995 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: 1 June 1995

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                PLDI '95 Paper Acceptance Rate28of105submissions,27%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