[Mlir-commits] [mlir] [mlir][spirv] Support function argument decorations for ptr in the PhysicalStorageBuffer (PR #76353)

Jakub Kuderski llvmlistbot at llvm.org
Fri Dec 29 08:18:22 PST 2023


================
@@ -369,6 +370,32 @@ LogicalResult spirv::Deserializer::processMemberName(ArrayRef<uint32_t> words) {
   return success();
 }
 
+void spirv::Deserializer::setArgAttrs(uint32_t argID) {
+  if (!decorations.contains(argID)) {
+    argAttrs.push_back(DictionaryAttr::get(context, {}));
+    return;
+  }
+
+  // Replace a decoration as UnitAttr with DecorationAttr for the physical
+  // buffer pointer in the function parameter.
+  // e.g. `aliased` -> `spirv.decoration = #spirv.decoration<Aliased>`).
----------------
kuhar wrote:

```suggestion
  // e.g. `aliased` -> `spirv.decoration = #spirv.decoration<Aliased>`.
```

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


More information about the Mlir-commits mailing list