[llvm] [SPIR-V] Remove metadata-driven kernel arg Volatile decoration (PR #215790)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 13:53:58 PDT 2026


================
@@ -134,7 +134,11 @@ getArgAccessQual(const Function &F, unsigned ArgIdx) {
 static std::vector<SPIRV::Decoration::Decoration>
 getKernelArgTypeQual(const Function &F, unsigned ArgIdx) {
   MDString *ArgAttribute = getOCLKernelArgTypeQual(F, ArgIdx);
-  if (ArgAttribute && ArgAttribute->getString() == "volatile")
+  if (!ArgAttribute)
+    return {};
+  SmallVector<StringRef, 3> Tokens;
+  ArgAttribute->getString().split(Tokens, ' ', -1, /*KeepEmpty=*/false);
+  if (llvm::is_contained(Tokens, "volatile"))
     return {SPIRV::Decoration::Volatile};
   return {};
 }
----------------
aobolensk wrote:

Thanks for providing the background!

Updated the patch and changed PR title as well

https://github.com/llvm/llvm-project/pull/215790


More information about the llvm-commits mailing list