【24h】

Equality saturation

机译:平等饱和

获取原文

摘要

Optimizations in a traditional compiler are applied sequentially, with each optimization destructively modifying the program to produce a transformed program that is then passed to the next optimization. We present a new approach for structuring the optimization phase of a compiler. In our approach, optimizations take the form of equality analyses that add equality information to a common intermediate representation. The optimizer works by repeatedly applying these analyses to infer equivalences between program fragments, thus saturating the intermediate representation with equalities. Once saturated, the intermediate representation encodes multiple optimized versions of the input program. At this point, a profitability heuristic picks the final optimized program from the various programs represented in the saturated representation. Our proposed way of structuring optimizers has a variety of benefits over previous approaches: our approach obviates the need to worry about optimization ordering,enables the use of a global optimization heuristic that selects among fully optimized programs, and can be used to perform translation validation, even on compilers other than our own. We present our approach, formalize it, and describe our choice of intermediate representation. We also present experimental results showing that our approach is practical in terms of time and space overhead, is effective at discovering intricate optimization opportunities, and is effective at performing translation validation for a realistic optimizer.
机译:顺序应用传统编译器中的优化,每个优化都破坏性地修改程序以产生转换的程序,然后将转换为下一个优化。我们提出了一种构建编译器优化阶段的新方法。在我们的方法中,优化采用平等分析的形式,该分析将平等信息添加到常见的中间表示。优化器通过重复将这些分析反复应用于程序片段之间的等效性,从而使中间表示与平等相等。一旦饱和,中间表示编码了多个优化版本的输入程序。此时,盈利启发式从饱和表示中所示的各种程序中选择最终优化程序。我们提出的结构化优化器的方式对先前的方法具有各种优势:我们的方法避免了担心优化排序的需要,使得使用全局优化启发式,可以在完全优化的程序中选择,并且可用于执行翻译验证,即使是我们自己以外的编制者。我们提出了我们的方法,正式化,并描述了我们选择的中间代表。我们还提出了实验结果,表明我们的方法在时间和空间开销方面是实际的,有效地发现错综复杂的优化机会,并且有效地对现实优化器进行翻译验证。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号