@@ -20,9 +20,10 @@ include "mlir/IR/OpBase.td"
2020
2121/// Interface for operations with arguments attributes (both call-like
2222/// and callable operations).
23- def OpWithArgumentAttributesInterface : OpInterface<"OpWithArgumentAttributesInterface "> {
23+ def ArgumentAttributesOpInterface : OpInterface<"ArgumentAttributesOpInterface "> {
2424 let description = [{
25- A call-like or callable operation that may define attributes for its arguments.
25+ A call-like or callable operation that can hold attributes for its arguments
26+ and results.
2627 }];
2728 let cppNamespace = "::mlir";
2829 let methods = [
@@ -32,40 +33,34 @@ def OpWithArgumentAttributesInterface : OpInterface<"OpWithArgumentAttributesInt
3233 number to the number of arguments. Alternatively, the method can
3334 return null to indicate that the region has no argument attributes.
3435 }],
35- "::mlir::ArrayAttr", "getArgAttrsAttr", (ins),
36- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return nullptr; }]>,
36+ "::mlir::ArrayAttr", "getArgAttrsAttr">,
3737 InterfaceMethod<[{
3838 Get the array of result attribute dictionaries. The method should return
3939 an array attribute containing only dictionary attributes equal in number
4040 to the number of results. Alternatively, the method can return
4141 null to indicate that the region has no result attributes.
4242 }],
43- "::mlir::ArrayAttr", "getResAttrsAttr", (ins),
44- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return nullptr; }]>,
43+ "::mlir::ArrayAttr", "getResAttrsAttr">,
4544 InterfaceMethod<[{
4645 Set the array of argument attribute dictionaries.
4746 }],
48- "void", "setArgAttrsAttr", (ins "::mlir::ArrayAttr":$attrs),
49- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return; }]>,
47+ "void", "setArgAttrsAttr", (ins "::mlir::ArrayAttr":$attrs)>,
5048 InterfaceMethod<[{
5149 Set the array of result attribute dictionaries.
5250 }],
53- "void", "setResAttrsAttr", (ins "::mlir::ArrayAttr":$attrs),
54- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return; }]>,
51+ "void", "setResAttrsAttr", (ins "::mlir::ArrayAttr":$attrs)>,
5552 InterfaceMethod<[{
5653 Remove the array of argument attribute dictionaries. This is the same as
5754 setting all argument attributes to an empty dictionary. The method should
5855 return the removed attribute.
5956 }],
60- "::mlir::Attribute", "removeArgAttrsAttr", (ins),
61- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return nullptr; }]>,
57+ "::mlir::Attribute", "removeArgAttrsAttr">,
6258 InterfaceMethod<[{
6359 Remove the array of result attribute dictionaries. This is the same as
6460 setting all result attributes to an empty dictionary. The method should
6561 return the removed attribute.
6662 }],
67- "::mlir::Attribute", "removeResAttrsAttr", (ins),
68- /*methodBody=*/[{}], /*defaultImplementation=*/[{ return nullptr; }]>,
63+ "::mlir::Attribute", "removeResAttrsAttr">
6964 ];
7065}
7166
@@ -74,8 +69,7 @@ def OpWithArgumentAttributesInterface : OpInterface<"OpWithArgumentAttributesInt
7469// a call-like operation. This represents the destination of the call.
7570
7671/// Interface for call-like operations.
77- def CallOpInterface : OpInterface<"CallOpInterface",
78- [OpWithArgumentAttributesInterface]> {
72+ def CallOpInterface : OpInterface<"CallOpInterface"> {
7973 let description = [{
8074 A call-like operation is one that transfers control from one sub-routine to
8175 another. These operations may be traditional direct calls `call @foo`, or
@@ -138,8 +132,7 @@ def CallOpInterface : OpInterface<"CallOpInterface",
138132}
139133
140134/// Interface for callable operations.
141- def CallableOpInterface : OpInterface<"CallableOpInterface",
142- [OpWithArgumentAttributesInterface]> {
135+ def CallableOpInterface : OpInterface<"CallableOpInterface"> {
143136 let description = [{
144137 A callable operation is one who represents a potential sub-routine, and may
145138 be a target for a call-like operation (those providing the CallOpInterface
0 commit comments