Module 16: Data Flow Analysis in Presence of Procedure Calls
  Lecture 32: Iteration
 


Iteration Space

  • Concept associated with the loops
  • Contains one point for each iteration of the loop
  • If a statement in one iteration dependes on a statement in another iteration then dependence is represented by an edge from source to target (called iteration space dependence graph)
for i = 2 to 9 do
x[i] = . . .
= . . . x[i-1] . . .
endfor
  • Space requirement too large
  • Compiler can not always determine number of iterations

Iteration Vector

Each iteration is assigned a vector
iv = (I1, I2, . . ., In)
Where Ik is the value of loop index variable of kth nested loop at that iteration.

for i = 3 to 7 do
for j = 6 to 2 step -2 do
a[i,j] = a[i,,j+2] + 1
endfor
endfor