[mlir] Explain required attrs for CallOpInterface in Toy (NFC) (#141018)
Following #123176. Signed-off-by: Joshua James Venter <venter.joshua@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c82b30c134
commit
d0fbfa6d97
@@ -159,7 +159,20 @@ def GenericCallOp : Toy_Op<"generic_call",
|
||||
|
||||
In the above we also use the `DeclareOpInterfaceMethods` directive to
|
||||
auto-declare all of the interface methods in the class declaration of
|
||||
GenericCallOp. We have already provided the definition in the `extraClassDeclaration`
|
||||
`GenericCallOp`. However, using this directive with `CallOpInterface`
|
||||
includes methods for handling argument and result attributes. Therefore,
|
||||
we need to add these specifically named attributes to our `GenericCallOp`
|
||||
definition:
|
||||
|
||||
```tablegen
|
||||
let arguments = (ins
|
||||
...
|
||||
OptionalAttr<DictArrayAttr>:$arg_attrs,
|
||||
OptionalAttr<DictArrayAttr>:$res_attrs
|
||||
);
|
||||
|
||||
|
||||
We have already provided the definition in the `extraClassDeclaration`
|
||||
field of the `FuncOp` class:
|
||||
|
||||
```c++
|
||||
|
||||
Reference in New Issue
Block a user