[Mlir-commits] [mlir] [mlir][SPIR-V] Add OpDecorateId support for Id-form decorations (PR #194611)
Arseniy Obolenskiy
llvmlistbot at llvm.org
Tue Apr 28 22:48:57 PDT 2026
================
@@ -377,12 +380,69 @@ LogicalResult spirv::Deserializer::processDecoration(ArrayRef<uint32_t> words) {
return res;
break;
}
+ case spirv::Decoration::AlignmentId:
+ case spirv::Decoration::MaxByteOffsetId:
+ case spirv::Decoration::CounterBuffer:
+ if (words.size() != 3) {
+ return emitError(unknownLoc, "OpDecorateId with ")
+ << decorationName << " needs a single <id> operand";
+ }
+ pendingIdDecorations.push_back({words[0],
+ static_cast<spirv::Decoration>(words[1]),
+ words[2], unknownLoc});
+ break;
default:
return emitError(unknownLoc, "unhandled Decoration : '") << decorationName;
}
return success();
}
+LogicalResult spirv::Deserializer::resolveDeferredIdDecorations() {
+ for (const DeferredIdDecoration &entry : pendingIdDecorations) {
+ auto decorationName = stringifyDecoration(entry.decoration);
----------------
aobolensk wrote:
Done
https://github.com/llvm/llvm-project/pull/194611
More information about the Mlir-commits
mailing list