New classes are added to ODS to enable specifying additional information on the arguments and results of an operation. These classes, Arg and Res allow for adding a description and a set of 'decorators' along with the constraint. This enables specifying the side effects of an operation directly on the arguments and results themselves.
Example:
def LoadOp : Std_Op<"load"> { let arguments = (ins Arg<"The MemRef to load from.", AnyMemRef, [MemRead]>:$memref, Variadic<Index>:$indices); }
Depends On D74439
One last question about the ordering, what about switching the constraint and the text?
Then we have
AnyMemRef
Arg<AnyMemRef>
Arg<AnyMemRef, "the reference to load from">
Arg<AnyMemRef, "the reference to load from", [MemRead]>
and it just seems to extend more naturally (and one could have desc be empty to match what we have today implicitly).
Or is there a reason you prefer this ordering?