[libclc] [libclc] Support the generic address space (PR #137183)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu May 1 04:29:21 PDT 2025
================
@@ -23,4 +23,20 @@
#define _CLC_DEF __attribute__((always_inline))
#endif
+#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \
+ (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \
+ defined(__opencl_c_generic_address_space))
+#define _CLC_GENERIC_AS_SUPPORTED 1
+// Note that we hard-code the assumption that a non-distinct address space means
+// that the target maps the generic address space to the private address space.
+#ifdef __CLC_DISTINCT_GENERIC_ADDRSPACE__
+#define _CLC_DISTINCT_GENERIC_AS_SUPPORTED 1
+#else
+#define _CLC_DISTINCT_GENERIC_AS_SUPPORTED 0
+#endif
+#else
----------------
arsenm wrote:
This is ultimately a clang bug. The two functions are different symbols. addressSpaceMapManglingFor shouldn't be reporting true in the colliding cases
https://github.com/llvm/llvm-project/pull/137183
More information about the cfe-commits
mailing list