[Mlir-commits] [mlir] [mlir][spirv] Support function argument decorations for ptr in the PhysicalStorageBuffer (PR #76353)
Kohei Yamaguchi
llvmlistbot at llvm.org
Thu Jan 4 01:49:01 PST 2024
================
@@ -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)
----------------
sott0n wrote:
I checked that this syntax isn't accepted and causes an error below.
```
test.mlir:4:132: error: expected '>'
spirv.func @access(%arg0 : !spirv.ptr<!spirv.struct<(f32)>, PhysicalStorageBuffer> { spirv.decoration = #spirv.decoration<Aliased|Restrict>, spirv.decoration = #spirv.decoration<Restrict>}) -> f32 "None" {
```
https://github.com/llvm/llvm-project/pull/76353
More information about the Mlir-commits
mailing list