]> granicus.if.org Git - clang/commit
[OpenCL] AMDGCN: Fix size_t type
authorYaxun Liu <Yaxun.Liu@amd.com>
Thu, 18 Aug 2016 19:34:04 +0000 (19:34 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Thu, 18 Aug 2016 19:34:04 +0000 (19:34 +0000)
commit7441a2bd4f9983e69fa66d8afb8a16753e6a8224
treeabe40161f5ebe35e50daf684af54c45cd29c6e30
parentcd39b643d9e1e5e7d5a85874a9176501c227c9f1
[OpenCL] AMDGCN: Fix size_t type

Pointers of certain GPUs in AMDGCN target in private address space is 32 bit but pointers in other address spaces are 64 bit. size_t type should be defined as 64 bit for these GPUs so that it could hold pointers in all address spaces. Also fixed issues in pointer arithmetic codegen by using pointer specific intptr type.

Differential Revision: https://reviews.llvm.org/D23361

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279121 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp
lib/Basic/Targets.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenTypeCache.h
test/CodeGenOpenCL/size_t.cl [new file with mode: 0644]