Skip to main content

Types for register allocation

  • Conference paper
  • First Online:
Book cover Implementation of Functional Languages (IFL 1997)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1467))

Included in the following conference series:

Abstract

We have set out to explore a type based approach to register allocation for purely functional languages. To lay a theoretical ground for that work, we have first developed a functional typed intermediate language with explicit register usage that we present in this paper. The language, which is a lambda calculus with flavours of assembly language, is able to express the register assignments resulting from a global, graph coloring based register allocation. We prove that our system is consistent and correct with respect to a standard semantics.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. L. Hennessy and D. A. Patterson. Computer architecture: a quantitative approach. Morgan Kaufmann Publishers, Palo Alto, 1990.

    Google Scholar 

  2. John M. Lucassen and David K. Gifford. Polymorphic Effect Systems. In 15th Annual ACM Symposium on Principles of Programming Languages, pages 47–57, San Diego, California, January 1988. ACM Press.

    Google Scholar 

  3. Pierre Jouvelot and David K. Gifford. Algebraic Reconstruction of Types and Effects. In Proc. 18th ACM Symp. on Principles of Programming Languages, pages 303–310, Orlando, Florida, January 1991. ACM Press.

    Google Scholar 

  4. Peter A. Steenkiste. Advanced Register Allocation. In Peter Lee, editor, Topics in Advanced Language Implementation. MIT Press, 1991.

    Google Scholar 

  5. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, Tools. Addison-Wesley Publishing Company, Reading, Mass., 1986.

    Google Scholar 

  6. Mads Tofte and Jean-Pierre Talpin. Implementation of the Typed Call-by-Value ≫-calculus using a Stack of Regions. In 21th Annual ACM Symposium on Principles of Programming Languages, pages 188–201, Portland, Oregon, January 1994. ACM Press.

    Google Scholar 

  7. Jean-Pierre Talpin and Pierre Jouvelot. The Type and Effect Discipline. In Seventh Annual IEEE Symposium on Logic in Computer Science, pages 162–173, Santa Cruz, California, June 1992. IEEE Press.

    Google Scholar 

  8. Simon L. Peyton Jones. Compiling haskell by program transformation: a report from the trenches. In Proceedings of the European Symposium on Programming, Linköping, April 1996.

    Google Scholar 

  9. Zhong Shao and Andrew W. Appel. A Type-Based Compiler for Standard ML. In SIGPLAN Symposium on Programming Language Design and Implementation (PLDI'95), pages 116–129, La Jolla, June 1995. ACM.

    Google Scholar 

  10. D. Tarditi, G. Morriset, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A Type-Directed Optimizing Compiler for ML. In SIGPLAN Symposium on Programming Language Design and Implementation (PLDI'96), pages 181–192, Philadelphia, May 1996. ACM.

    Google Scholar 

  11. Greg Morriset, David Walker, Karl Crary, and Neal Glew. From System F to Typed Assembly Language. In 25th ACM Symposium on Principles of Programming Languages (POPL '98), San Diego, California, January 1998. ACM.

    Google Scholar 

  12. Lars Birkedal, Mads Tofte, and Magnus Vejlstrup. From Region Inference to von Neumann Machines via Region Representation Inference. In 23rd ACM Symposium on Principles of Programming Languages (POPL '98), pages 171–183, St. Petersburg Beach, Florida, January 1996. ACM.

    Google Scholar 

  13. F. Chow and J. Hennessy. Register Allocation by Priority-based Coloring. In Proceedings of the SIGPLAN '84 Symposium on Compiler Construction, pages 222–232, Montreal, 1984.

    Google Scholar 

  14. Mark P. Jones. A Theory of Qualified Types. In ESOP'92: European Symposium on Programming, volume 582 of Lecture Notes in Computer Science, Rennes, France, February 1992. Springer-Verlag.

    Google Scholar 

  15. Urban Boquist. Interprocedural Register Allocation for Lazy Functional Languages. Licentiate Thesis, Chalmers University of Technology, Mars 1995. URL: http://www.cs.Chalmers.se/~boquist/lic.ps.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Chris Clack Kevin Hammond Tony Davie

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Agat, J. (1998). Types for register allocation. In: Clack, C., Hammond, K., Davie, T. (eds) Implementation of Functional Languages. IFL 1997. Lecture Notes in Computer Science, vol 1467. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0055426

Download citation

  • DOI: https://doi.org/10.1007/BFb0055426

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64849-9

  • Online ISBN: 978-3-540-68528-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics