Question: Example 4 . 1 0 . 2 : Loop unrolling for multiple - issue pipelines. See how well loop unrolling and scheduling work in the

Example 4.10.2: Loop unrolling for multiple-issue pipelines.
See how well loop unrolling and scheduling work in the example above. For simplicity, assume that the loop index is a multiple of four.
Answer
To schedule the loop without any delays, it turns out that we need to make four copies of the loop body. After unrolling and eliminating the unnecessary loop overhead instructions, the loop will contain four copies each of LDUR, ADD, and STUR, plus one SUBI, one CMP, and one CBZ. the figure below shows the unrolled and scheduled code.
During the unrolling process, the compiler introduced additional registers (x1,x2,x3). The goal of this process, called register renaming, is to eliminate dependences that are not true data dependences, but could either lead to potential hazards or prevent the compiler from flexibly scheduling the code. Consider how the unrolled code would look using only x0. There would be repeated instances of LDUR X0,[X20,#0], ADD X0, X0, X21 followed by STUR x0,[x20,#8], but these sequences, despite using x0, are actually completely independent-no data values flow between one set of these instructions and the next set. This case is what is called an antidependence or name dependence, which is an ordering forced purely by the reuse of a name, rather than a real data dependence that is also called a true dependence.
 Example 4.10.2: Loop unrolling for multiple-issue pipelines. See how well loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!