This is an archive of the discontinued LLVM Phabricator instance.

[mlir:PDL] Add support for creating ranges in rewrites
ClosedPublic

Authored by rriddle on Sep 12 2022, 11:45 AM.

Details

Summary

This commit adds support for building a concatenated range from
a given set of elements, either single element or other ranges, within a
rewrite. We could conceptually extend this to support constraining
input ranges, but the logic there is quite a bit more complex so it is
left for later work when a need arises.

Diff Detail

Event Timeline

rriddle created this revision.Sep 12 2022, 11:45 AM
rriddle requested review of this revision.Sep 12 2022, 11:45 AM
rriddle updated this revision to Diff 460541.Sep 15 2022, 4:27 PM
rriddle edited the summary of this revision. (Show Details)
jpienaar accepted this revision.Oct 6 2022, 7:04 PM

Nice

mlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td
1012

OOC when is it not

!pdl.T, pdl.range<T>

? E.g., with one specified is the other fixed?

mlir/lib/Rewrite/ByteCode.cpp
107

CreateDynamicTypeRange ? (just to mirror, else it feels like one is a specialization of the other)

1200

else if (TypeRange ...) ?

Or can read not fail here.

This revision is now accepted and ready to land.Oct 6 2022, 7:04 PM
rriddle updated this revision to Diff 473848.Nov 7 2022, 6:25 PM
rriddle marked 3 inline comments as done.
This revision was automatically updated to reflect the committed changes.