CUDA: add CodeGen support for global variable address spaces.
authorPeter Collingbourne <peter@pcc.me.uk>
Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Sun, 20 May 2012 21:08:35 +0000 (21:08 +0000)
commitf44bdf9c5fc347f1639d50c49de2b836f28017e2
treea21092fbd172f3ac505a42a8bc578d9daeee9b77
parent853a8a982bb9b3220e3625b725b15faa8ba91d99
CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0.  This relies on address
space 0 being a unified address space.

llvm-svn: 157167
clang/include/clang/Basic/AddressSpaces.h
clang/lib/AST/ASTContext.cpp
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/test/CodeGenCUDA/address-spaces.cu [new file with mode: 0644]