[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:09:25 PST 2023


================
@@ -280,6 +285,9 @@ def SPIRV_FuncOp : SPIRV_Op<"func", [
     ```mlir
     spirv.func @foo() -> () "None" { ... }
     spirv.func @bar() -> () "Inline|Pure" { ... }
+
+    spirv.func @baz(%arg0: !spirv.ptr<i32, PhysicalStorageBuffer> { spirv.decoration = #spirv.decoration<Aliased|Restrict>}) -> () "None" { ... }
+    spirv.func @qux(%arg0: !spirv.ptr<!spirv.ptr<i32, PhysicalStorageBuffer>, Generic> { spirv.decoration = #spirv.decoration<AliasedPointer|RestrictPointer>}) "None)
----------------
kuhar wrote:

We should have 2 separate test cases like above. But further, we should also have the verifier reject arguments with both decorations.

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


More information about the Mlir-commits mailing list