Gopalasubramanian, Ganesh via llvm-dev
2019-Mar-28  09:46 UTC
[llvm-dev] Computing the iteration space of nested loops
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>