Whole-program compilation in MLton

Whole-program compilation in MLton
复制标题

MLton 中的整个程序编译

DOI:
10.1145/1159876.1159877
复制
发表时间:
2006
期刊:
Higher-Order and Symbolic Computation
影响因子:
--
通讯作者:
Stephen Weeks
Stephen Weeks
中科院分区:
--
文献类型:
--
作者:
Stephen Weeks

文献摘要

被引文献

相似文献

MLton 是一种稳定、强大、广泛移植的标准 ML (SML) 编译器,可生成高效的可执行文件。全程序编译是MLton成功的关键,它显着提高了正确性和效率。整个程序编译使许多优化成为可能,从而减少或消除 SML 强大的抽象机制(例如参数模块、多态性和高阶函数)的成本。它还允许 MLton 使用简单类型的一阶中间语言。通过用这种简单的中间语言将 MLton 优化器的大部分构建为整个程序的小传递,可以轻松实现和调试新的优化。这种中间语言使用标准控制流图和静态单赋值形式的变体,这使得也可以轻松实现传统的局部优化。拥有整个程序还可以实现标准数据表示,例如未装箱的整数和数组,以及用户定义的数据结构的高效表示。本次演讲将描述 MLton 的整个程序编译方法,涵盖优化和中间语言,以及克服一些工程挑战,使在超过十万行的程序上使用 MLton 成为可能。它还将涵盖 MLton 项目从 1997 年启动至今的历史,并给出一些经验教训和对 MLton 未来的思考。
MLton is a stable, robust, widely ported, Standard ML (SML) compiler that generates efficient executables. Whole-program compilation is the key to MLton's success, significantly improving both correctness and efficiency. Whole-program compilation makes possible a number of optimizations that reduce or eliminate the cost of SML's powerful abstraction mechanisms, such as parametric modules, polymorphism, and higher-order functions. It also allows MLton to use a simply-typed, first-order, intermediate language. By structuring the bulk of MLton's optimizer as small passes on whole programs in this simple intermediate language, it is easy to implement and debug new optimizations. This intermediate language uses a variant of standard control-flow graphs and static single assignment form, which makes it easy to implement traditional local optimizations as well. Having the whole program also enables standard data representations such as unboxed integers and arrays, as well as efficient representations for user-defined data structures.This talk will describe MLton's approach to whole-program compilation, covering the optimizations and the intermediate languages, as well as some of the engineering challenges that were overcome to make it feasible to use MLton on programs with over one hundred thousand lines. It will also cover the history of the MLton project from its inception in 1997 until now, and give some lessons learned and thoughts on the future of MLton.