<div dir="ltr">Hello, I was pretending to make a little memory dependence analysis following "Optimizing compilers for modern architectures", but I've found a little problem.<br><br>I don't know how to infer the array subscripting from the GEP instruction.<br>
<br>for (i1 = 0; i1 < N1; ++i1)<br>  for (i2 = 0; i2 < N2; ++i2)<br>    ...<br>      A[i3][i5][i1][...]<br><br>At first I though to obtain the chain recurrence:<br><br>(pointer to A) + alpha1*i1 + alpha2*i2 + ...<br>
<br>And suppose that the major alpha corresponds to the first subscript, and so on.<br><br>But, this is only making permutations, if I have something a little more complex:<br><br>A = [10][10];<br><br>for (i = 0; i < 10; ++i) <br>
  for (j = 0; j < 10; ++j)<br>    A[j][10-i]<br><br>I would have: (pointer to A) + 10 - i + 10j<br><br>Or:<br><br>for (i = 0; i < 10; ++i) <br>
  for (j = 0; j < 10; ++j)<br>
    A[j][i-j]<br><br>(pointer to A) + i -9j<br><br>Etc, etc..... Well, in conclusion, how did you minded to highering gep to array subscripting, or there is another dependence analysis that doesn't make necessary splitting subscripts?<br>
<br><br></div>