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

Jakub Kuderski llvmlistbot at llvm.org
Thu Dec 28 14:11:43 PST 2023


================
@@ -275,14 +271,33 @@ LogicalResult Serializer::processDecoration(Location loc, uint32_t resultID,
   case spirv::Decoration::NoUnsignedWrap:
   case spirv::Decoration::RelaxedPrecision:
   case spirv::Decoration::Restrict:
-    // For unit attributes, the args list has no values so we do nothing
-    if (auto unitAttr = dyn_cast<UnitAttr>(attr.getValue()))
+  case spirv::Decoration::RestrictPointer:
+    // For unit attributes and decoration attributes, the args list
+    // has no values so we do nothing.
+    if (isa<UnitAttr>(attr) || isa<DecorationAttr>(attr))
----------------
kuhar wrote:

```suggestion
    if (isa<UnitAttr, DecorationAttr>(attr))
```

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


More information about the Mlir-commits mailing list