A unifying framework for optimizing transformations

A unifying framework for optimizing transformations
复制标题

优化转型的统一框架

DOI:
--
复制
发表时间:
1992
期刊:
影响因子:
--
通讯作者:
D. Whitfield
D. Whitfield
中科院分区:
--
文献类型:
--
作者:
D. Whitfield

文献摘要

被引文献

相似文献

为了了解传统编译器优化和并行化优化的特性(这些优化经常应用于程序代码以提高并行化程度),我们开发了优化转换统一框架(UFOT),用于指定优化和自动生成优化器。对于一组选定的优化,该框架可用于确定优化之间的交互作用,这些交互作用可为应用其他优化创造条件,也可为应用其他优化破坏条件。通过这些交互作用,可以得出一个应用顺序,试图最大限度地发挥可应用于程序的优化的潜在优势。 该框架还被用于创建通用优化规范语言(GOSpeL),其实施的最终结果是开发出一个优化生成器(GENesis),可根据规范自动生成优化程序。将规范输入生成器后,生成的代码将应用指定的优化。这些优化措施应用于源程序的扩展中间表示法,因此 GENesis 一般与源语言无关。GENesis 的强大之处在于它可以生成需要全局条件的优化,而这正是传统优化和并行优化所需要的。我们已经构建了 GENesis 的原型实现,并生成和验证了大量优化器。 已经进行了各种实验,并确定了许多结果。实验结果表明,许多理论上的相互作用在实践中都会发生,而某些优化的应用点却很少被发现。实验还表明,同一程序的不同代码段需要不同的优化顺序。因此,应根据代码段而不是整个程序进行优化。我们还进行了实验,以检验应用优化的成本和预期收益。实验发现,某些优化的成本与其收益相比过高,而在某些情况下,通过仔细指定优化方案,可以降低优化成本。研究还发现,某些优化的成本会因优化生成器生成的不同实现而有很大差异。
As an approach to understanding the properties of traditional compiler optimizations and parallelizing optimizations that are frequently applied to program code to increase the degree of parallelism, a Unifying Framework for Optimizing Transformations (UFOT) was developed for specifying optimizations and automatically producing optimizers. For a selected set of optimizations, the framework is used to determine those interactions among the optimizations that can create and those that can destroy conditions for applying other optimizations. From these interactions, an application order is derived that attempts to maximize the potential benefits of the optimizations that can be applied to a program. The framework is also used to create a General Optimization Specification Language (GOSpeL) whose implementation culminates in the development of an optimizer generator (GENesis) that automatically produces optimizers from specifications. The specifications are input into the generator, and code is produced for applying the specified optimizations. The optimizations are applied to an extended intermediate representation of a source program, thus making GENesis generally source language independent. GENesis is powerful in that it can generate optimizations that require global conditions, which are needed for traditional and parallelizing optimizations. A prototype implementation of GENesis has been constructed and numerous optimizers have been produced and verified. A variety of experiments have been performed and numerous results have been determined. Experimentation indicates that many theoretical interactions occur in practice, and application points for some optimizations are rarely found. The experiments also indicate that different orderings of optimizations are needed for different code segments of the same program. Thus, optimizations should be applied on a code segment basis rather than to an entire program. Experimentation was also performed to examine the cost of applying an optimization and the expected benefit. It was found that the cost of some optimizations as compared to their benefit is prohibitive, and in some cases the cost of an optimization can be reduced by carefully specifying the optimization. It was also found that the cost of some optimizations varies significantly with different implementations produced by the optimizer generator.