Next: Loop-carried dependences...cont'd
Up: Dependence
Previous: Loop-carried dependences
Unroll:
S1:
:= 0
S21:
:=
+ B[1]
S22: A[2] :=
+ B[2]
S23: A[3] := A[2] + B[3]
S24: A[4] := A[3] + B[4]
S25: A[5] := A[4] + B[5]
- In this case, there is a data dependence
- This is a loop-carried dependence - the dependence spans a loop
iteration
- This loop is inherently sequential