aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/FileManagerTest.cpp
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2014-06-03 18:16:31 +0000
committerSebastian Pop <spop@codeaurora.org>2014-06-03 18:16:31 +0000
commit422e33f36334fbac32304ccd7c0f2186cb0b7395 (patch)
tree764db548b37534014bd2303c8e71cc51222f51ab /clang/unittests/Basic/FileManagerTest.cpp
parent68c246aad0836b7a948cc4088c85677a36637174 (diff)
downloadllvm-422e33f36334fbac32304ccd7c0f2186cb0b7395.zip
llvm-422e33f36334fbac32304ccd7c0f2186cb0b7395.tar.gz
llvm-422e33f36334fbac32304ccd7c0f2186cb0b7395.tar.bz2
record delinearization result and reuse it in polyhedral translation
Without this patch, the testcase would fail on the delinearization of the second array: ; void foo(long n, long m, long o, double A[n][m][o]) { ; for (long i = 0; i < n; i++) ; for (long j = 0; j < m; j++) ; for (long k = 0; k < o; k++) { ; A[i+3][j-4][k+7] = 1.0; ; A[i][0][k] = 2.0; ; } ; } ; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[3 + i0, -4 + i1, 7 + i2] }; ; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] }; Here is the output of FileCheck on the testcase without this patch: ; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] }; ^ <stdin>:26:2: note: possible intended match here [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[o0] }; ^ It is possible to find a good delinearization for A[i][0][k] only in the context of the delinearization of both array accesses. There are two ways to delinearize together all array subscripts touching the same base address: either duplicate the code from scop detection to first gather all array references and then run the delinearization; or as implemented in this patch, use the same delinearization info that we computed during scop detection. llvm-svn: 210117
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
0 files changed, 0 insertions, 0 deletions