Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LD -> any 1 stall FPALU -> any: 3 stalls FPALU ->ST: 2 stalls IntALU - BR 1 stal

ID: 3709526 • Letter: L

Question

LD -> any 1 stall FPALU -> any: 3 stalls FPALU ->ST: 2 stalls IntALU - BR 1 stall Smart Schedule Loop: L.D FO, 0(R1) stall ADD.D F4, FO, F2 stall stall S.D F4, O(R1) DADDUI R1, R1,#-8 stall BNE R1, R2, Loop stall Loop: L.D FO, 0(R1) DADDUI R1, R1,#-8 ADD.D F4, FO, F2 stall BNE R1, R2, Loop S.D F4, 8(R1) By re-ordering instructions, it takes 6 cycles per iteration instead of 10 We were able to violate an anti-dependence easily because an immediate was involved Loop overhead (instrs that do book-keeping for the loop): 2 Actual work (the ld, add.d, and s.d): 3 instrs Can we somehow get execution time to be 3 cycles per iteration? 19

Explanation / Answer

The 2nd one is just reordering the instruction which saves iteration per cycle. Its common is loops that we want to avoid numbers of instruction inside loop. way of optimization.