[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
Julio
julio.martin.hidalgo at gmail.com
Thu Aug 28 00:31:06 PDT 2008
Hello, I was pretending to make a little memory dependence analysis
following "Optimizing compilers for modern architectures", but I've found a
little problem.
I don't know how to infer the array subscripting from the GEP instruction.
for (i1 = 0; i1 < N1; ++i1)
for (i2 = 0; i2 < N2; ++i2)
...
A[i3][i5][i1][...]
At first I though to obtain the chain recurrence:
(pointer to A) + alpha1*i1 + alpha2*i2 + ...
And suppose that the major alpha corresponds to the first subscript, and so
on.
But, this is only making permutations, if I have something a little more
complex:
A = [10][10];
for (i = 0; i < 10; ++i)
for (j = 0; j < 10; ++j)
A[j][10-i]
I would have: (pointer to A) + 10 - i + 10j
Or:
for (i = 0; i < 10; ++i)
for (j = 0; j < 10; ++j)
A[j][i-j]
(pointer to A) + i -9j
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080828/df16c5ee/attachment.html>
More information about the llvm-dev
mailing list