[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)
commit6305f8a3517f5a702b691f81d669145263f82fa2
treec0f87447bdd2e23ff20facb3e28bdb3b0308200a
parent9e60a2ad734e1d598f93e7148c6339795b57359c
[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

llvm-svn: 279121
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/TargetInfo.cpp
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenTypeCache.h
clang/test/CodeGenOpenCL/size_t.cl [new file with mode: 0644]