[clang] [CIR][OpenCL] Add kernel argument metadata attribute (PR #199530)
David Rivera via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 11:58:26 PDT 2026
================
@@ -996,6 +996,10 @@ def CIR_LangAddressSpaceAttr : CIR_EnumAttr<CIR_LangAddressSpace,
}];
}
+def CIR_LangAddressSpaceArrayAttr
+ : CIR_TypedArrayAttrBase<CIR_LangAddressSpaceAttr,
----------------
RiverDave wrote:
I was initially confused on whether if we should allow target AS to be emitted on the opencl AS descriptor. It seems that is not the case, if you do something wacky like:
```c
__kernel void foo(__global int *g, __attribute__((address_space(1))) int *t) {}
```
Codegen will ignore the attribute and collapse this to 0 - which is offload_default in CIR's level of abstraction. So this is fine as far as I see.
https://github.com/llvm/llvm-project/pull/199530
More information about the cfe-commits
mailing list