[llvm-dev] Computing the iteration space of nested loops
Gopalasubramanian, Ganesh via llvm-dev
llvm-dev at lists.llvm.org
Thu Mar 28 02:46:04 PDT 2019
Hi All,
I am trying to experiment with SCEV.
For the below test, I want to know how I can get the max address accessed for array c.
Max address accessed would be
1. When i loop is at its last iteration (n-1)
2. When k loop is at its last iteration (n-1)
How to get this in terms of SCEV.
TEST:
int i,j,k,sum ;
int fn(int *a, int *b, int *c, int n)
{
int i,j,k,sum ;
for (k = 0 ;k <n; ++k) {
for (j = 0 ;j <n; ++j) {
for (i = 0 ;i <n; ++i) {
a[i] = b[i] + c[i + k] ;
}}}
return sum;
}
-Ganesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190328/42810c09/attachment.html>
More information about the llvm-dev
mailing list