This is an archive of the discontinued LLVM Phabricator instance.

[mlir][pdl] Add a new !pdl.range<> type
ClosedPublic

Authored by rriddle on Jan 29 2021, 7:54 PM.

Details

Summary

This type represents a range of positional values. It will be used in followup revisions to add support for variadic constructs to PDL, such as operand and result ranges.

Depends On D95716

Diff Detail

Event Timeline

rriddle created this revision.Jan 29 2021, 7:54 PM
rriddle requested review of this revision.Jan 29 2021, 7:54 PM
jpienaar accepted this revision.Feb 28 2021, 2:19 PM
jpienaar added inline comments.
mlir/include/mlir/Dialect/PDL/IR/PDLTypes.td
58

So the range itself is not captured as a parem (or am I missing it?) but this the type corresponding to the runtime range

64

Could we add kwarg style comments for the different bodies?

This revision is now accepted and ready to land.Feb 28 2021, 2:19 PM
rriddle updated this revision to Diff 327947.Mar 3 2021, 3:34 PM
rriddle marked 2 inline comments as done.

Rebase

mlir/include/mlir/Dialect/PDL/IR/PDLTypes.td
58

Reworded. If we look at something like ValueRange in the same way as Value, a PDL_Range<Value> is not conceptually different from a PDL_Value. The PDL_Range is a handle to multiple values, the PDL_Value is a handle to one.

64

Obsolete now that the getChecked body is no longer necessary.

This revision was landed with ongoing or failed builds.Mar 3 2021, 3:55 PM
This revision was automatically updated to reflect the committed changes.