【24h】

Loop Quasi-Invariant Chunk Detection

机译:循环准不变块检测

获取原文

摘要

Several techniques for analysis and transformations are used in compilers. Among them, the peeling of loops for hoisting quasi-invariants can be used to optimize generated code, or simply ease developers' lives. In this paper, we introduce a new concept of dependency analysis borrowed from the field of Implicit Computational Complexity (ICC), allowing to work with composed statements called "Chunks" to detect more quasi-invariants. Based on an optimization idea given on a WHILE language, we provide a transformation method - reusing ICC concepts and techniques [8,10] - to compilers. This new analysis computes an invariance degree for each statement or chunks of statements by building a new kind of dependency graph, finds the "maximum" or "worst" dependency graph for loops, and recognizes if an entire block is Quasi-Invariant or not. This block could be an inner loop, and in that case the computational complexity of the overall program can be decreased. In this paper, we introduce the theory around this concept and present a prototype analysis pass implemented on LLVM. We already implemented a proof of concept on a toy C parser (https://github. com/ThomasRuby/LQICM_On_C_Toy_Parser) analysing and transforming the AST representation. In a very near future, we will implement the corresponding transformation within our prototype LLVM pass and provide benchmarks comparisons.
机译:编译器中使用了几种分析和转换技术。其中,提升准不变式的循环剥离可用于优化生成的代码,或简单地简化开发人员的生活。在本文中,我们引入了从隐式计算复杂性(ICC)领域借来的依赖分析的新概念,从而允许使用称为“块”的组合语句来检测更多的准不变性。基于WHILE语言给出的优化思想,我们为编译器提供了一种转换方法-重用ICC概念和技术[8,10]。这种新的分析通过构建一种新的依赖图来计算每个语句或语句块的不变度,找到循环的“最大”或“最差”依赖图,并识别整个块是否为准不变。该块可以是一个内部循环,在这种情况下,可以降低整个程序的计算复杂度。在本文中,我们将介绍围绕该概念的理论,并介绍在LLVM上实现的原型分析过程。我们已经在玩具C解析器(https:// github。com / ThomasRuby / LQICM_On_C_Toy_Parser)上实现了概念验证,以分析和转换AST表示形式。在不久的将来,我们将在原型LLVM过程中实现相应的转换,并提供基准比较。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号