Secrets of the Glasgow Haskell Compiler inliner

Secrets of the Glasgow Haskell Compiler inliner
复制标题

Glasgow Haskell 编译器内联器的秘密

DOI:
--
复制
发表时间:
2002
影响因子:
1.1
通讯作者:
S. Marlow
S. Marlow
中科院分区:
计算机科学2区
文献类型:
--
作者:
S. Jones;S. Marlow

文献摘要

被引文献

相似文献

诸如Haskell之类的高级语言鼓励程序员通过组成函数来构建抽象。以一种实例,任何编译器撰写的人都会告诉您,内在的是一项黑色艺术,充满了精致的妥协,可以在没有不必要的代码的情况下进行良好的表现因此,本文是为了阐明我们从全尺度的“生产” Inliner中学到的关键课程,这是格拉斯哥Haskell编译器中使用的,我们主要关注算法方面,但我们还提供了一些指示性测量值Inliner各个方面的重要性。
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.