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.
Preview
Unable to display preview. Download preview PDF.
References
J. L. Hennessy and D. A. Patterson. Computer architecture: a quantitative approach. Morgan Kaufmann Publishers, Palo Alto, 1990.
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.
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.
Peter A. Steenkiste. Advanced Register Allocation. In Peter Lee, editor, Topics in Advanced Language Implementation. MIT Press, 1991.
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, Tools. Addison-Wesley Publishing Company, Reading, Mass., 1986.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Rights 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