Understanding Feedback
1-14
1.4.3
Stage 3: Software Pipeline the Loop
Once the compiler has completed qualification of the loop, partitioned it, and
analyzed the necessary loop carry and resource requirements, it can begin to
attempt software pipelining. This section will focus on the following lines from
the feedback example:
Example 1–4.Stage 3 Feedback
;* Searching for software pipeline schedule at ...
;* ii = 5 Register is live too long
;* ii = 6 Did not find schedule
;* ii = 7 Schedule found with 3 iterations in parallel
;* done
;*
;* Epilog not entirely removed
;* Collapsed epilog stages : 1
;*
;* Prolog not removed
;* Collapsed prolog stages : 0
;*
;* Minimum required memory pad : 2 bytes
;*
;* Minimum safe trip count : 2
-
Iteration interval (ii). The number of cycles between the initiation of
successive iterations of the loop. The smaller the iteration interval, the
fewer cycles it takes to execute a loop. All of the numbers shown in each
row of the feedback imply something about what the minimum iteration in-
terval (mii) will be for the compiler to attempt initial software pipelining.
Several things will determine what the mii of the loop is and are described
in the following sections. The mii is simply the maximum of any of these
individual mii’s.
The first thing the compiler attempts during this stage, is to schedule the loop
at an iteration interval (ii) equal to the mii determined in stage 2: collect loop
resource and dependency graph information. In the example above, since the
A–side bound (.L, .S, .D, .LS, and .LSD) was the mii bottleneck, our example
starts with:
;* Searching for software pipeline schedule at ...
;* ii = 5 Register is live too long
If the attempt was not successful, the compiler provides additional feedback
to help explain why. In this case, the compiler cannot find a schedule at 11
cycles because register is live too long. For more information about live too
long issues, see section 6.10, on page 6-101.