Up until now, results have been represented as additional results to a pdl.operation. This is fairly clunky, as it mismatches the representation of the rest of the IR constructs(e.g. pdl.operand) and also isn't a viable representation for operations returned by pdl.create_native. This representation also creates much more difficult problems when factoring in support for variadic result groups, optional results, etc. To resolve some of these problems, and simplify adding support for variable length results, this revision extracts the representation for results out of pdl.operation in the form of a new pdl.result operation. This operation returns the result of an operation at a given index, e.g.:
%root = pdl.operation ... %result = pdl.result 0 of %root
Depends On D95718
Nit: mention that the result index is zero-based