ABSTRACT
This paper solves an open problem regarding loop unrolling after periodic register allocation. Although software pipelining is a powerful technique to extract fine-grain parallelism, it generates reuse circuits spanning multiple loop iterations. These circuits require periodic register allocation, which in turn yield a code generation challenge, generally addressed through: (1) hardware support --- rotating register files --- deemed too expensive for embedded processors, (2) insertion of register moves with a high risk of reducing the computation throughput --- initiation interval (II) --- of software pipelining, and (3) post-pass loop unrolling that does not compromise throughput but often leads to unpractical code growth. The latter approach relies on the proof that MAXLIVE registers are sufficient for periodic register allocation (2; 3; 5); yet the only heuristic to control the amount of post-pass loop unrolling does not achieve this bound and leads to undesired register spills (4; 7).
We propose a periodic register allocation technique allowing a software-only code generation that does not trade the optimality of the II for compactness of the generated code. Our idea is based on using the remaining registers: calling Rarch the number of architectural registers of the target processor, then the number of remaining registers that can be used for minimising the unrolling degree is equal to Rarch-MAXLIVE.
We provide a complete formalisation of the problem and algorithm, followed by extensive experiments. We achieve practical loop unrolling degrees in most cases --- with no increase of the II --- while state-of-the-art techniques would either induce register spilling, degrade the II or lead to unacceptable code growth.
- D. de Werra, C. Eisenbeis, S. Lelait, and B. Marmol. On a Graph-Theoretical Model for Cyclic Register Allocation. Discrete Applied Mathematics, 93(2-3):191--203, July 1999. Google Scholar
Digital Library
- S.A.A. Touati and C. Eisenbeis. Early Periodic Register Allocation on ILP Processors.Parallel Processing Letters, Vol. 14, No. 2, June 2004. World Scientific.Google Scholar
- L. J. Hendren, G. R. Gao, E. R. Altman, and C. Mukerji. A Register Allocation Framework Based on Hierarchical Cyclic Interval Graphs. In Proceedings of the International Conference on Compiler Construction (CC'02). Lecture Notes in Computer Science, 641:176--191, 1992. Google Scholar
Digital Library
- M. Lam. Software Pipelining: An Effective Scheduling Technique for VLIW Machines, In Proceedings of the SIGPLAN 88 Conference on Programming Language Design and Implementation, pages 318--328, Atlanta, Georgia, June 22-24, 1988. Google Scholar
Digital Library
- C. Eisenbeis, S. Lelait and B. Marmol. The Meeting Graph: A New Model for Loop Cyclic Register Allocation.in Proceedings of the IFIP WG 10.3 Working Conference on Parallel Architectures and Compilation Techniques, PACT 95, pages 264--267, Limasol,Cyprus, June 1995. ACM Press. Google Scholar
Digital Library
- J.C. Dehnert, P.Y Hsu, and J.P. Bratt. Overlapped Loop Support in the Cydra 5.In proceedings of the Third International Conference on Architectural Support for Programming Languages and Operating Systems, pages 26--38, Boston, Massachusetts, 1989. Google Scholar
Digital Library
- Sylvain Lelait. Contribution à l'Allocation de Registres dans les Boucles. PhD thesis, Université d'Orléans, France, January 1996.Google Scholar
- S.A.A. Touati. Register Pressure in Instruction Level Parallelism. PhD thesis, Université de Versailles, France, June 2002.Google Scholar
- B.D de Dinechin. A Unified Software Pipeline Construction Scheme For Modulo Scheduled Loops. Proceedings of the 4th International Conference on Parallel Computing Technologies, pages 189--200, Yaroslavl, Russia, August 7-9, 1997. Google Scholar
Digital Library
- R. Cytron and J. Ferrante. What's in a Name? or the Value of Renaming for Parallelism Detection and Storage Allocation, Proceedings of the 1987 International Conference on Parallel Processing, pages 19--27, Pennsylvanie, August 1987.Google Scholar
- A. Nicolau, R. Potasman and H. Wang. Register Allocation, Renaming and Their Impact on Fine-Grain Parallelism, Proceedings of the Fourth International Workshop on Languages and Compilers for Parallel Computing, Santa Clara, California, August 1991. Google Scholar
Digital Library
- Richard A. Huff. Lifetime-Sensitive Modulo Scheduling, In Proceedings of the ACM SIGPLAN 93 Conference on Programming Language Design and Implementation, pages 258--267, Albuquerque, New Mexico, June 23-25, 1993. Google Scholar
Digital Library
- J. A. Fisher, P. Faraboschi and C. Young.Embedded Computing: a VLIW Approach to Architecture, Compilers and Tools, Book, Morgan Kaufmann Publishers, 2005Google Scholar
Index Terms
Post-pass periodic register allocation to minimise loop unrolling degree
Recommendations
Post-pass periodic register allocation to minimise loop unrolling degree
LCTES '08This paper solves an open problem regarding loop unrolling after periodic register allocation. Although software pipelining is a powerful technique to extract fine-grain parallelism, it generates reuse circuits spanning multiple loop iterations. These ...
Evaluation of scheduling techniques on a SPARC-based VLIW testbed
MICRO 30: Proceedings of the 30th annual ACM/IEEE international symposium on MicroarchitectureThe performance of Very Long Instruction Word (VLIW) microprocessors depends on the close cooperation between the compiler and the architecture. This paper evaluates a set of important compilation techniques and related architectural features for VLIW ...
Vectorization-aware loop unrolling with seed forwarding
CC 2020: Proceedings of the 29th International Conference on Compiler ConstructionLoop unrolling is a widely adopted loop transformation, commonly used for enabling subsequent optimizations. Straight-line-code vectorization (SLP) is an optimization that benefits from unrolling. SLP converts isomorphic instruction sequences into ...







Comments