summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/default-address-space.c
Commit message (Collapse)AuthorAgeFilesLines
* [AMDGPU] Switch to the new addr space mapping by defaultYaxun Liu2018-02-021-19/+0
| | | | | | | | This requires corresponding llvm change. Differential Revision: https://reviews.llvm.org/D40956 llvm-svn: 324102
* CodeGen: Fix address space of global variableYaxun Liu2017-07-081-14/+14
| | | | | | | | | | | | | Certain targets (e.g. amdgcn) require global variable to stay in global or constant address space. In C or C++ global variables are emitted in the default (generic) address space. This patch introduces virtual functions TargetCodeGenInfo::getGlobalVarAddressSpace and TargetInfo::getConstantAddressSpace to handle this in a general approach. It only affects IR generated for amdgcn target. Differential Revision: https://reviews.llvm.org/D33842 llvm-svn: 307470
* [AMDGPU] Fix size and alignment of size_t and pointer typesYaxun Liu2017-07-051-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D34995 llvm-svn: 307121
* CodeGen: Cast temporary variable to proper address spaceYaxun Liu2017-06-191-8/+11
| | | | | | | | | | | | | | | | In C++ all variables are in default address space. Previously change has been made to cast automatic variables to default address space. However that is not sufficient since all temporary variables need to be casted to default address space. This patch casts all temporary variables to default address space except those for passing indirect arguments since they are only used for load/store. This patch only affects target having non-zero alloca address space. Differential Revision: https://reviews.llvm.org/D33706 llvm-svn: 305711
* [OpenCL] Map default address space to alloca address spaceYaxun Liu2017-04-111-0/+58
For OpenCL, the private address space qualifier is 0 in AST. Before this change, 0 address space qualifier is always mapped to target address space 0. As now target private address space is specified by alloca address space in data layout, address space qualifier 0 needs to be mapped to alloca addr space specified by the data layout. This change has no impact on targets whose alloca addr space is 0. With contributions from Matt Arsenault, Tony Tye and Wen-Heng (Jack) Chung Differential Revision: https://reviews.llvm.org/D31404 llvm-svn: 299965
OpenPOWER on IntegriCloud