Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion mlir/docs/Tutorials/Toy/Ch-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down