aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-09-15 14:05:58 +0000
committerTobias Grosser <tobias@grosser.es>2016-09-15 14:05:58 +0000
commitaaabbbf8863827cb9e286e1e04cc41f088f9383f (patch)
treeec5c4ccb9685e196e83f55e7edb6e30a3357f7f7 /clang/lib/Sema/SemaChecking.cpp
parent9edf96ec9b64f91a0d6b992a92f6762f87e3c67d (diff)
downloadllvm-aaabbbf8863827cb9e286e1e04cc41f088f9383f.zip
llvm-aaabbbf8863827cb9e286e1e04cc41f088f9383f.tar.gz
llvm-aaabbbf8863827cb9e286e1e04cc41f088f9383f.tar.bz2
GPGPU: Do not assume arrays start at 0
Our alias checks precisely check that the minimal and maximal accessed elements do not overlap in a kernel. Hence, we must ensure that our host <-> device transfers do not touch additional memory locations that are not covered in the alias check. To ensure this, we make sure that the data we copy for a given array is only the data from the smallest element accessed to the largest element accessed. We also adjust the size of the array according to the offset at which the array is actually accessed. An interesting result of this is: In case array are accessed with negative subscripts ,e.g., A[-100], we automatically allocate and transfer _more_ data to cover the full array. This is important as such code indeed exists in the wild. llvm-svn: 281611
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions