[PATCH] D73998: [DA] renaming the -da-disable-delinearization-checks option

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 12:11:14 PST 2020


Meinersbur added a comment.

Consider the example C source:

  float A[n*n+n];
  for (int i = 0; i < 2*n; i+=1)
    for (int j = 0; j < n; j+=1)
      A[j*n + i] = ...

Delinearization might convert the access to `A[j][i]` for an array of size `A[][n]`. However, in this example, elements accessed by the j-loop overlap into elements accessed by the (j+1)-loop. Assuming that A[j] and A[j+1] do not overlap ("assume-inrange") would be illegal, but from the source code's point-of-view, there is not even an inner array dimension that could be out-of-range. Since the loop bounds are derived heuristically, the user doesn't even know what indexes they agree to not overlap (it could also be `A[j/2][n*(j%2) + i]` for an array of size `A[][2*n]`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73998/new/

https://reviews.llvm.org/D73998





More information about the llvm-commits mailing list