【24h】

Weakest Precondition Synthesis for Compiler Optimizations

机译:编译器优化最薄弱的前提合成

获取原文

摘要

Compiler optimizations play an increasingly important role in code generation. This is especially true with the advent of resourcelimited mobile devices. We rely on compiler optimizations to improve performance, reduce code size, and reduce power consumption of our programs. Despite being a mature field, compiler optimizations are still designed and implemented by hand, and usually without providing any guarantee of correctness. In addition to devising the code transformations, designers and implementers have to come up with an analysis that determines in which cases the optimization can be safely applied. In other words, the optimization designer has to specify a precondition that ensures that the optimization is semantics-preserving. However, devising preconditions for optimizations by hand is a non-trivial task. It is easy to specify a precondition that, although correct, is too restrictive, and therefore misses some optimization opportunities. In this paper, we propose, to the best of our knowledge, the first algorithm for the automatic synthesis of preconditions for compiler optimizations. The synthesized preconditions are provably correct by construction, and they are guaranteed to be the weakest in the precondition language that we consider. We implemented the proposed technique in a tool named PSyCO. We present examples of preconditions synthesized by PSyCO, as well as the results of running PSyCO on a set of optimizations.
机译:编译器优化在代码生成中发挥着越来越重要的作用。尤其如此,随着资源化的移动设备的出现尤其如此。我们依靠编译优化来提高性能,降低代码大小,降低我们程序的功耗。尽管是成熟的领域,编译器优化仍然由手动设计和实现,通常不提供任何正确性的保证。除了设计代码转换之外,设计人员和实施者必须提出一个分析,确定在哪种情况下可以安全地应用优化。换句话说,优化设计器必须指定一种先决条件,以确保优化是语义保存的。然而,手动设计用于优化的前提是一个非琐碎的任务。很容易指定一个前提条件,虽然是正确的,但过于限制性,因此错过了一些优化的机会。在本文中,我们提出了据我们所知,这是一种自动合成编译器优化的前提条件的第一算法。合成的前提条件通过施工可证明是正确的,并且保证是我们考虑的前提语言中最弱的。我们在名为PSYCO的工具中实施了所提出的技术。我们提出了PSYCO合成的前提条件的示例,以及在一组优化上运行PSYCO的结果。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号