首页> 外文会议>International Haifa verification conference >Modeling undefined behaviour semantics for checking equivalence across compiler optimizations
【24h】

Modeling undefined behaviour semantics for checking equivalence across compiler optimizations

机译:为未定义的行为语义建模,以检查编译器优化之间的等效性

获取原文

摘要

Previous work on equivalence checking for synthesis and translation validation has usually verified programs across selected optimizations, disabling the ones that exploit undefined behaviour. On the other hand, modern compilers extensively exploit language level undefined behaviour for optimization. Previous work on equivalence checking for translation validation and synthesis yields poor results, when such optimizations relying on undefined behaviour are enabled. We extend previous work on simulation-based equivalence checking, by adding a framework for reasoning about language level undefined behaviour. We implement our ideas in a tool to compare equivalence across compiler optimizations produced by GCC and LLVM. Testing these compiler optimizations on programs taken from the SPEC integer benchmark suite, we find that modeling undefined behaviour semantics improves success rates for equivalence checking by 31 percentage points (from 50% to 81%) on average, almost uniformly across the two compilers. This significant difference in success rates confirms the widespread impact of undefined behaviour on compiler optimization, something that has been ignored by previous work on equivalence checking. Further, our work brings insight into the relative significance of the different types of C undefined behaviour on compiler optimization.
机译:以前有关合成和翻译验证的等效性检查的工作通常会在选定的优化中验证程序,从而禁用那些利用未定义行为的程序。另一方面,现代编译器广泛利用语言级别的未定义行为进行优化。如果启用了依赖未定义行为的此类优化,则先前有关翻译验证和综合的等效性检查的工作将产生较差的结果。通过添加推理语言级别未定义行为的框架,我们扩展了基于模拟的等效性检查的先前工作。我们在工具中实现我们的想法,以比较GCC和LLVM产生的编译器优化之间的等效性。在对来自SPEC整数基准套件的程序进行的这些编译器优化测试后,我们发现对未定义的行为语义建模可以将等效检查的平均成功率平均提高31个百分点(从50%增至81%),这在两个编译器上几乎是一样的。成功率的显着差异证实了不确定行为对编译器优化的广泛影响,而以前的等效性检查工作已忽略了这一点。此外,我们的工作使我们深入了解了不同类型的C未定义行为对编译器优化的相对重要性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号