Minimal Unroll Factor for Code Generation of Software Pipelining

被引:0
|
作者
Mounira Bachir
Sid-Ahmed-Ali Touati
Frederic Brault
David Gregg
Albert Cohen
机构
[1] University of Nice Sophia-Antipolis,
关键词
Periodic register allocation; Software pipelining; Code generation; Instruction level parallelism; Embedded systems; Compilation;
D O I
暂无
中图分类号
学科分类号
摘要
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 / 58
页数:57
相关论文
共 50 条
  • [1] Minimal Unroll Factor for Code Generation of Software Pipelining
    Bachir, Mounira
    Touati, Sid-Ahmed-Ali
    Brault, Frederic
    Gregg, David
    Cohen, Albert
    [J]. INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2013, 41 (01) : 1 - 58
  • [2] SURVEY OF METHODS FOR PARALLELIZING CODE AND SOFTWARE PIPELINING
    FRANTSUZOV, YA
    [J]. PROGRAMMING AND COMPUTER SOFTWARE, 1992, 18 (03) : 95 - 109
  • [3] Code generation for single-dimension software pipelining of multi-dimensional loops
    Rong, HB
    Douillet, A
    Govindarajan, R
    Gao, GR
    [J]. CGO 2004: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, 2004, : 175 - 186
  • [4] Parallelizing nonnumerical code with selective scheduling and software pipelining
    Moon, SM
    Ebcioglu, K
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1997, 19 (06): : 853 - 898
  • [5] Communication pipelining for Code Generation from Simulink Models
    Yan, Rongjie
    Huang, Kai
    Yu, Min
    Zhang, Xiaomeng
    [J]. 2013 12TH IEEE INTERNATIONAL CONFERENCE ON TRUST, SECURITY AND PRIVACY IN COMPUTING AND COMMUNICATIONS (TRUSTCOM 2013), 2013, : 1893 - 1900
  • [6] Software pipelining with minimal loop overhead on transport triggered architecture
    Jiang, Lei
    Zhu, Yongxin
    Wei, Yipeng
    [J]. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON EMBEDDED SOFTWARE AND SYSTEMS, 2008, : 451 - 458
  • [7] Software pipelining
    Allan, VH
    Jones, RB
    Lee, RM
    Allan, SJ
    [J]. ACM COMPUTING SURVEYS, 1995, 27 (03) : 367 - 432
  • [8] Trace Software Pipelining
    王剑
    [J]. Journal of Computer Science & Technology, 1995, (06) : 481 - 490
  • [9] Multi-dimensional kernel generation for loop nest Software Pipelining
    Douillet, Alban
    Rong, Hongbo
    Gao, Guang R.
    [J]. EURO-PAR 2006 PARALLEL PROCESSING, 2006, 4128 : 311 - 322