A Portable and Optimizing Back End for the SML/NJ Compiler

A Portable and Optimizing Back End for the SML/NJ Compiler
复制标题

SML/NJ 编译器的可移植且优化的后端

DOI:
--
复制
发表时间:
1994
期刊:
International Conference on Compiler Construction
影响因子:
--
通讯作者:
John H. Reppy
John H. Reppy
中科院分区:
--
文献类型:
--
作者:
Lal George;F. Guillame;John H. Reppy

文献摘要

被引文献

相似文献

在便携式后端必须解决两个主要目标:必须选择一系列良好的说明顺序,以充分利用机器的功能,并且必须可以协调目标特定的优化。第一个问题的关键是语言MLRISC(部分旨在代表可在硬件中实现的最简单,最基本的操作)。 MLRISC的重要性在于,它为表达任何硬件平台的指令集提供了共同的表示。使用Target指令集的简洁和清晰规范表示的自下而上的树模式与动态编程匹配,用于从MLRISC程序生成目标机器代码。目标特定的优化是通过用跨体系结构常见的概念参数化现成的优化模块来执行的。显示了各种体系结构的规范,以及混合和匹配复杂优化算法的能力。最终的后端与SML/NJ中使用的中间语言无关,并且可以原则上用于编译器中的来源语言,与SML完全不同。我们认为,将编译器移植到新体系结构所需的努力要比现有的抽象机器方法要少得多,并且从初步体系结构描述驱动的优化中报告了很大的收益。
There are two major goals that must be addressed in a portable back end: a good sequence of instructions must be selected making full use of the capabilities of the machine, and it must be possible to orchestrate target-specific optimizations. A key to the first problem is the language MLRISC, intended in part, to represent the simplest and most basic operations implementable in hardware. The importance of MLRISC is that it provides a common representation for expressing the instruction set of any hardware platform. Bottom-up tree pattern matching with dynamic programming, expressed using succinct and clear specifications of the target instruction set, is used to generate target machine code from an MLRISC program. Target-specific optimizations are performed by parameterizing off-the-shelf optimization modules with concepts common across architectures. The specification of a variety of architectures, and the ability to mix and match sophisticated optimization algorithms are shown. The resulting back end is independent of the intermediate language used in SML/NJ, and could in principle be used in a compiler for a source language quite different from SML. We argue that porting the compiler to a new architecture requires substantially less effort than the existing abstract machine approach, and report significant gains from preliminary architecture description driven optimizations.