【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)领域借用的依赖性分析的新概念,允许使用名为“块”的编组语句来检测更多的准不变。基于虽然语言给出的优化思路,我们提供了一种转换方法 - 重用ICC概念和技术[8,10] - 编译器。这个新分析通过构建一种新的依赖图来计算每个语句或语句的块的不变性度,找到循环的“最大”或“最差”依赖关系图,并识别整个块是否是准不变的。该块可以是内循环,在这种情况下,可以减少整个程序的计算复杂性。在本文中,我们介绍了围绕这一概念的理论,并提出了在LLVM上实现的原型分析通行证。我们已经在玩具C解析器上实现了概念证​​明(HTTPS:// GitHub。COM / ThomasRuby / LQICM_ON_C_TOY_PARSER)分析和转换AST表示。在不久的将来,我们将在我们的原型LLVM通过中实现相应的转换,并提供基准比较。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号