diff options
author | Nick Sarnie <nick.sarnie@intel.com> | 2025-04-28 15:26:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-28 19:26:01 +0000 |
commit | f9ee5ce605f94d905d3112fd0923a5fd23e48dd3 (patch) | |
tree | 835b7a88bbd044595e9c16e4dd3fd7803409ac21 /clang/lib | |
parent | 95795ab7dc3029e64e0a0a7893b95f4bfab667f1 (diff) | |
download | llvm-f9ee5ce605f94d905d3112fd0923a5fd23e48dd3.zip llvm-f9ee5ce605f94d905d3112fd0923a5fd23e48dd3.tar.gz llvm-f9ee5ce605f94d905d3112fd0923a5fd23e48dd3.tar.bz2 |
[clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (#137187)
Based on feedback from https://github.com/llvm/llvm-project/pull/136753,
remove the dummy values for OpenCL and make them match the zero default
AS map.
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Basic/Targets/SPIR.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Basic/Targets/SPIR.h b/clang/lib/Basic/Targets/SPIR.h index 310ef9f..bf249e2 100644 --- a/clang/lib/Basic/Targets/SPIR.h +++ b/clang/lib/Basic/Targets/SPIR.h @@ -58,15 +58,13 @@ static const unsigned SPIRDefIsPrivMap[] = { // Used by both the SPIR and SPIR-V targets. static const unsigned SPIRDefIsGenMap[] = { 4, // Default - // Some OpenCL address space values for this map are dummy and they can't be - // used 1, // opencl_global - 0, // opencl_local - 0, // opencl_constant + 3, // opencl_local + 2, // opencl_constant 0, // opencl_private - 0, // opencl_generic - 0, // opencl_global_device - 0, // opencl_global_host + 4, // opencl_generic + 5, // opencl_global_device + 6, // opencl_global_host // cuda_* address space mapping is intended for HIPSPV (HIP to SPIR-V // translation). This mapping is enabled when the language mode is HIP. 1, // cuda_device |