skip to main content
10.1145/1069774.1069791acmconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
Article

Efficiently compiling a functional language on AMD64: the HiPE experience

Published: 11 July 2005 Publication History

Abstract

We describe and document our experience from developing an AMD64 backend for the HiPE (High Performance Erlang) native code compiler. We consider implementation alternatives and critically examine design choices for obtaining an efficient AMD64 backend. In particular, we consider in detail how other functional language implementors can migrate their existing x86 backends to the AMD64 architecture, a platform which is becoming increasingly important these days. We mention backend components that can be shared between x86 and AMD64, and those that better be different for achieving high performance on AMD64. Finally, we measure the performance of several different alternatives in the hope that this information can save development effort for others who intend to engage in a similar feat.

References

[1]
AMD Corporation. AMD64 Architecture Programmer's Manual, Sept. 2003. Publication # 24592, 24593, 24594, 26568, 26569.
[2]
AMD Corporation. Software Optimization Guide for AMD AthlonTM 64 and AMD OpteronTM 64 Processors, Sept. 2003. Publication # 25112, Revision 3.03.
[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.
[4]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Prog. Lang. Syst., 13(4):451--490, Oct. 1991.
[5]
R. K. Dybvig. Three Implementation Models for Scheme. PhD thesis, Department of Computer Science, University of North Carolina at Chapel Hill, 1987. Technical Report TR87-011. Available from: http://www.cs.indiana.edu/scheme-repository/.
[6]
L. George and A. W. Appel. Iterated register coalescing. ACM Trans. Prog. Lang. Syst., 18(3):300--324, May 1996.
[7]
J. Hubička. Porting GCC to the AMD64 architecture. In Proceedings of the GCC Developers Summit, pages 79--105, May 2003.
[8]
J. Hubička, A. Jaeger, and M. Mitchell. System V Application Binary Interface, AMD64 Architecture Processor Supplement. See www.x86-64.org.
[9]
E. Johansson, M. Pettersson, K. Sagonas, and T. Lindgren. The development of the HiPE system: Design and experience report. Springer International Journal of Software Tools for Technology Transfer, 4(4):421--436, Aug. 2003.
[10]
X. Leroy et al. The Objective Caml system release 3.07. INRIA, Sept. 2003. See also http://caml.inria.fr/ocaml/.
[11]
T. Lindahl and K. Sagonas. Unboxed compilation of oating point arithmetic in a dynamically typed language environment. In R. Pe~na and T. Arts, editors, Implementation of Functional Languages: Proceedings of the 14th International Workshop, volume 2670 of LNCS, pages 134--149. Springer, Sept. 2002.
[12]
M. Pettersson. Linux performance-monitoring counters kernel extension. Available from: http://user.it.uu.se/~mikpe/linux/perfctr/.
[13]
M. Pettersson, K. Sagonas, and E. Johansson. The HiPE/x86 Erlang compiler: System description and performance evaluation. In Z. Hu and M. Rodríguez-Artalejo, editors, Proceedings of the Sixth International Symposium on Functional and Logic Programming, volume 2441 of LNCS, pages 228--244, Berlin, Germany, Sept. 2002. Springer.
[14]
M. Poletto and V. Sarkar. Linear scan register allocation. ACM Trans. Prog. Lang. Syst., 21(5):895--913, Sept. 1999.
[15]
K. Sagonas and E. Stenman. Experimental evaluation and improvements to linear scan register allocation. Software Practice and Experience, 33(11):1003--1034, Sept. 2003.
[16]
G. L. Steele Jr. Rabbit: a compiler for Scheme (a study in compiler optimization). MIT AI Memo 474, Massachusetts Institute of Technology, May 1978. Master's Thesis.
[17]
M. N. Wegman and F. K. Zadeck. Constant propagation with conditional branches. ACM Trans. Prog. Lang. Syst., 13(2):181--210, Apr. 1991.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PPDP '05: Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming
July 2005
260 pages
ISBN:1595930906
DOI:10.1145/1069774
  • General Chair:
  • Pedro Barahona,
  • Program Chair:
  • Amy Felty
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 July 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AMD64
  2. erlang
  3. functional programming

Qualifiers

  • Article

Conference

PPDP05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 185 of 381 submissions, 49%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 235
    Total Downloads
  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)2
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media