Skip to main content

Linear Scan Register Allocation in a High-Performance Erlang Compiler

  • Conference paper
  • First Online:
Book cover Practical Aspects of Declarative Languages (PADL 2002)

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

Included in the following conference series:

Abstract

In the context of an optimizing native code compiler for the concurrent functional programming language Erlang, we experiment with various register allocation schemes focusing on the recently proposed linear scan register allocator. We describe its implementation and extensively report on its behaviour both on register-rich and on register-poor architectures. We also investigate how different options to the basic algorithm and to the compilation process as a whole affect compilation time and quality of the produced code. Overall, the linear scan register allocator is a good choice on register-rich architectures; when compilation time is a concern, it can also be a viable option on register-poor architectures.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading, MA, 1986.

    Google Scholar 

  2. J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, second edition, 1996.

    Google Scholar 

  3. P. Briggs, K. D. Cooper, and L. Torczon. Improvements to graph coloring register allocation. ACM Trans. Prog. Lang. Syst., 16(3):428–455, May 1994.

    Article  Google Scholar 

  4. G. J. Chaitin. Register allocation & spilling via graph coloring. In Proceedings of the SIGPLAN Symposium on Compiler Construction, pages 98–105. ACM Press, June 1982.

    Google Scholar 

  5. G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P.W. Markstein. Register allocation via coloring. Computer Languages, 6(1):47–57, Jan. 1981.

    Article  Google Scholar 

  6. L. George and A. W. Appel. Iterated register coalescing. ACM Trans. Prog. Lang. Syst., 18(3):300–324, May 1996.

    Article  Google Scholar 

  7. E. Johansson, M. Pettersson, and K. Sagonas. HiPE: A High Performance Erlang system. In Proceedings of the ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pages 32–43. ACM Press, Sept. 2000.

    Google Scholar 

  8. S. S. Muchnick. Advanced Compiler Design & Implementation. Morgan Kaufman Publishers, San Fransisco, CA, 1997.

    Google Scholar 

  9. J. Park and S.-M. Moon. Optimistic register coalescing. In Proceedings of the 1998 International Conference on Parallel Architecture and Compilation Techniques, pages 196–204. IEEE Press, Oct. 1998.

    Google Scholar 

  10. M. Poletto, W. C. Hsieh, D. R. Engler, and M. F. Kaashoek. ’C and tcc: A language and compiler for dynamic code generation. ACM Trans. Prog. Lang. Syst., 21(2):324–369, Mar. 1999.

    Article  Google Scholar 

  11. M. Poletto and V. Sarkar. Linear scan register allocation. ACM Trans. Prog. Lang. Syst., 21(5):895–913, Sept. 1999.

    Article  Google Scholar 

  12. O. Traub, G. Holloway, and M. D. Smith. Quality and speed in linear-scan register allocation. In Proceedings of SIGPLAN Conference on Programming Language Design and Implementation, pages 142–151. ACM Press, June 1998.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Johansson, E., Sagonas, K. (2002). Linear Scan Register Allocation in a High-Performance Erlang Compiler. In: Krishnamurthi, S., Ramakrishnan, C.R. (eds) Practical Aspects of Declarative Languages. PADL 2002. Lecture Notes in Computer Science, vol 2257. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45587-6_8

Download citation

  • DOI: https://doi.org/10.1007/3-540-45587-6_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43092-6

  • Online ISBN: 978-3-540-45587-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics