summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenOpenCL/address-spaces.cl
Commit message (Collapse)AuthorAgeFilesLines
* Fix opencl test broken on windows by r350643.Erich Keane2019-01-081-2/+2
| | | | | | | | | Windows doesn't allow common with alignment >32 bits, so these tests were broken in windows mode. This patch makes 'common' optional in these cases. Change-Id: I4d5fdd07ecdafc3570ef9b09cd816c2e5e4ed15e llvm-svn: 350645
* Bring r325915 back.Rafael Espindola2018-02-231-9/+9
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325940
* Clean up AMDGCN testsYaxun Liu2018-02-151-13/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D43340 llvm-svn: 325279
* [AMDGPU] Change constant addr space to 4Yaxun Liu2018-02-131-4/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D43171 llvm-svn: 325031
* [AMDGPU] Switch to the new addr space mapping by defaultYaxun Liu2018-02-021-6/+4
| | | | | | | | This requires corresponding llvm change. Differential Revision: https://reviews.llvm.org/D40956 llvm-svn: 324102
* Fix regression of test/CodeGenOpenCL/address-spaces.cl on ppcYaxun Liu2017-10-131-1/+2
| | | | llvm-svn: 315678
* [OpenCL] Add LangAS::opencl_private to represent private address space in ASTYaxun Liu2017-10-131-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | Currently Clang uses default address space (0) to represent private address space for OpenCL in AST. There are two issues with this: Multiple address spaces including private address space cannot be diagnosed. There is no mangling for default address space. For example, if private int* is emitted as i32 addrspace(5)* in IR. It is supposed to be mangled as PUAS5i but it is mangled as Pi instead. This patch attempts to represent OpenCL private address space explicitly in AST. It adds a new enum LangAS::opencl_private and adds it to the variable types which are implicitly private: automatic variables without address space qualifier function parameter pointee type without address space qualifier (OpenCL 1.2 and below) Differential Revision: https://reviews.llvm.org/D35082 llvm-svn: 315668
* [AMDGPU] Fix regressions on mesa/clover with libclc due to address spaceYaxun Liu2017-07-041-0/+2
| | | | | | | | | | Currently AMDGPUTargetInfo does not initialize AddrSpaceMap in constructor, which causes regressions in mesa/clover with libclc. This patch fixes that. Differential Revision: https://reviews.llvm.org/D34987 llvm-svn: 307105
* [OpenCL] Map default address space to alloca address spaceYaxun Liu2017-04-111-10/+21
| | | | | | | | | | | | | | 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
* [OpenCL] Align fake address space map with the SPIR target maps.Egor Churaev2016-12-231-4/+4
| | | | | | | | | | | | | | | Summary: We compile user opencl kernel code with spir triple. But built-ins are written in OpenCL and we compile it with triple x86_64 to be able to use x86 intrinsics. And we need address spaces to match in both cases. So, we change fake address space map in OpenCL for matching with spir. On CPU address spaces are not really important but we'd like to preserve address space information in order to perform optimizations relying on this info like enhanced alias analysis. Reviewers: pekka.jaaskelainen, Anastasia Subscribers: pekka.jaaskelainen, yaxunl, bader, cfe-commits Differential Revision: https://reviews.llvm.org/D28048 llvm-svn: 290436
* [OpenCL 2.0] Apply default address space (AS).Anastasia Stulova2015-11-231-17/+37
| | | | | | | | | | | | If AS of a variable/parameter declaration is not set by the source, OpenCL v2.0 s6.5 defines explicit rules for default ASes: - The AS of global and local static variables defaults to global; - All pointers point to generic AS. http://reviews.llvm.org/D13168 llvm-svn: 253863
* Add support for language-specific address spaces. On top of that,Peter Collingbourne2011-03-181-0/+27
add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
OpenPOWER on IntegriCloud