[clang] [OpenCL] Add clang internal extension __cl_clang_non_kernel_scope_local_memory (PR #176726)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 19 19:08:12 PST 2026
================
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -triple spir64 -disable-llvm-passes -emit-llvm -o - | FileCheck %s
+
+#pragma OPENCL EXTENSION __cl_clang_non_kernel_scope_local_memory : enable
----------------
wenju-he wrote:
renamed to __cl_clang_local_memory_all_scopes
The restriction in the spec is at https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#_usage_for_declaration_scopes_and_variable_types : `Variables declared in the outermost compound statement inside the body of the kernel function can be qualified by the local or constant address spaces.`
https://github.com/llvm/llvm-project/pull/176726
More information about the cfe-commits
mailing list