Hostname: page-component-78c5997874-8bhkd Total loading time: 0 Render date: 2024-11-05T21:41:21.976Z Has data issue: false hasContentIssue false

Secrets of the Glasgow Haskell Compiler inliner

Published online by Cambridge University Press:  08 July 2003

SIMON PEYTON JONES
Affiliation:
Microsoft Research Ltd, 7 JJ Thompson Avenue, Cambridge CB3 0FB, UK (e-mail: {simonpj,simonmar}@microsoft.com)
SIMON MARLOW
Affiliation:
Microsoft Research Ltd, 7 JJ Thompson Avenue, Cambridge CB3 0FB, UK (e-mail: {simonpj,simonmar}@microsoft.com)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Higher-order languages such as Haskell encourage the programmer to build abstractions by composing functions. A good compiler must inline many of these calls to recover an efficiently executable program. In principle, inlining is dead simple: just replace the call of a function by an instance of its body. But any compiler-writer will tell you that inlining is a black art, full of delicate compromises that work together to give good performance without unnecessary code bloat. The purpose of this paper is, therefore, to articulate the key lessons we learned from a full-scale “production” inliner, the one used in the Glasgow Haskell compiler. We focus mainly on the algorithmic aspects, but we also provide some indicative measurements to substantiate the importance of various aspects of the inliner.

Type
Research Article
Copyright
© 2002 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.