Loop Shifting for Loop Compaction

  • Authors:
  • Alain Darte;Guillaume Huard

  • Affiliations:
  • LIP, ENS-Lyon, 46, Allée d'Italie, 69007 Lyon, France;LIP, ENS-Lyon, 46, Allée d'Italie, 69007 Lyon, France

  • Venue:
  • International Journal of Parallel Programming - Special issue on instruction-level parallelism and parallelizing compilation, part 2
  • Year:
  • 2000

Quantified Score

Hi-index 0.01

Visualization

Abstract

The idea of decomposed software pipelining is to decouple the software pipelining problem into a cyclic scheduling problem without resource constraints and an acyclic scheduling problem with resource constraints. In terms of loop transformation and code motion, the technique can be formulated as a combination of loop shifting and loop compaction. Loop shifting amounts to moving statements between iterations thereby changing some loop independent dependences into loop carried dependences and vice versa. Then, loop compaction schedules the body of the loop considering only loop independent dependences, but taking into account the details of the target architecture. In this paper, we show how loop shifting can be optimized so as to minimize both the length of the critical path and the number of dependences for loop compaction. The first problem is well-known and can be solved by an algorithm due to Leiserson and Saxe. We show that the second optimization (and the combination with the first one) is also polynomially solvable with a fast graph algorithm, variant of minimum-cost flow algorithms. Finally, we analyze the improvements obtained on loop compaction by experiments on random graphs.