首页> 外文期刊>International journal of parallel programming >Minimal Unroll Factor for Code Generation of Software Pipelining
【24h】

Minimal Unroll Factor for Code Generation of Software Pipelining

机译:用于软件流水线代码生成的最小展开系数

获取原文

摘要

We address the problem of generating compact code from software pipelined loops. Although software pipelining is a powerful technique to extract fine-grain parallelism, it generates lifetime intervals spanning multiple loop iterations. These intervals require periodic register allocation (also called variable expansion), which in turn yields a code generation challenge. We are looking for the minimal unrolling factor enabling the periodic register allocation of software pipelined kernels. This challenge is generally addressed through one of: (1) hardware support in the form of rotating register files, which solve the unrolling problem but are expensive in hardware; (2) register renaming by inserting register moves, which increase the number of operations in the loop, and may damage the schedule of the software pipeline and reduce throughput; (3) post-pass loop unrolling that does not compromise throughput but often leads to impractical code growth. The latter approach relies on the proof that MAXLIVE registers (maximal number of values simultaneously alive) are sufficient for periodic register allocation (Eisenbeis et al. in PACT '95: Proceedings of the IFIP WG10.3 working conference on Parallel Architectures and Compilation Techniques, pages 264-267, Manchester, UK, 1995; Hendren et al. in CC '92: Proceedings of the 4th International Conference on Compiler Construction, pages 176-191, London, UK, 1992). However, the best existing heuristic for controlling this code growth-modulo variable expansion (Lam in SIGPLAN Not 23(7):318-328, 1988)-may not apply the correct amount of loop unrolling to guarantee that MAXLIVE registers are enough, which may result in register spills Eisenbeis et al. in PACT '95: Proceedings of the IFIP WG10.3 working conference on Parallel Architectures and Compilation Techniques, pages 264-267, Manchester, UK, 1995. This paper presents our research results on the open problem of minimal loop unrolling, allowing a software-only code generation that does not trade the optimality of the initiation interval (II) for the compactness of the generated code. Our novel idea is to use the remaining free registers after periodic register allocation to relax the constraints on register reuse. The problem of minimal loop unrolling arises either before or after software pipelining, either with a single or with multiple register types (classes). We provide a formal problem definition for each scenario, and we propose and study a dedicated algorithm for each problem. Our solutions are implemented within an industrial-strength compiler for a VLIW embedded processor from STMicroelectronics, and validated on multiple benchmarks suites.
机译:我们解决了从软件管道循环生成紧凑代码的问题。尽管软件流水线是提取细粒度并行性的强大技术,但它会生成跨越多个循环迭代的生命周期间隔。这些间隔需要定期的寄存器分配(也称为变量扩展),这反过来会产生代码生成挑战。我们正在寻找使软件流水线内核能够定期进行寄存器分配的最小展开因子。通常通过以下方式之一来解决该挑战:(1)旋转寄存器文件形式的硬件支持,它解决了展开问题,但硬件价格昂贵; (2)通过插入寄存器移动来重命名寄存器,这会增加循环中的操作数量,并可能破坏软件管道的调度并降低吞吐量; (3)传递后循环展开不会影响吞吐量,但通常会导致不切实际的代码增长。后一种方法依赖于这样的证明,即MAXLIVE寄存器(同时存在的最大数量的值)足以用于周期性的寄存器分配(Eisenbeis等人,在PACT '95:IFIP WG10.3并行体系结构和编译技术工作会议论文集, (第264-267页,英国曼彻斯特,1995年; Hendren等人在CC '92:第四届国际编译器构建会议论文集,第176-191页,英国伦敦,1992年)。但是,用于控制此代码增长的最佳启发式-变量扩展(SIG中的Lam,Not 23(7):318-328,1988年)可能无法应用正确的循环展开量来确保MAXLIVE寄存器足够,这可能会导致寄存器溢出Eisenbeis等。在PACT '95:IFIP WG10.3并行体系结构和编译技术工作会议论文集,第264-267页,英国曼彻斯特,1995年。本文介绍了我们对最小环路展开的开放问题的研究结果,该软件允许-仅代码生成,它不以初始间隔(II)的最优性为代价来生成代码。我们的新想法是在定期分配寄存器后使用剩余的空闲寄存器来放松对寄存器重用的限制。最小循环展开的问题出现在具有单个或多个寄存器类型(类)的软件流水线之前或之后。我们为每种情况提供了正式的问题定义,并针对每种问题提出并研究了专用算法。我们的解决方案在意法半导体(STMicroelectronics)的VLIW嵌入式处理器的工业级编译器中实现,并在多个基准套件上进行了验证。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号