This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Separate high-D insert/extract strided slice rewrite
ClosedPublic

Authored by antiagainst on Apr 5 2022, 9:10 AM.

Details

Summary

Right now populateVectorInsertExtractStridedSliceTransforms contains
two categories of patterns, one for decomposing high-D insert/extract
strided slices, the other for lowering them to shuffle ops.
They are at different levels---the former is in the middle, while
the latter is a step of final lowering. Split them to give users
more control of which pattern to pick.

This means break down the previous VectorExtractStridedSliceOpRewritePattern,
which is doing two things together.

Also renamed those patterns to be clearer.

Diff Detail

Event Timeline

antiagainst created this revision.Apr 5 2022, 9:10 AM
Herald added a project: Restricted Project. · View Herald Transcript
antiagainst requested review of this revision.Apr 5 2022, 9:10 AM

Fix wrong API call

antiagainst retitled this revision from [mlir][vector] Expose different rank insert_strided_slice rewrite to [mlir][vector] Separate high-D insert/extract strided slice rewrite.Apr 5 2022, 10:25 AM
antiagainst edited the summary of this revision. (Show Details)
ThomasRaoux accepted this revision.Apr 5 2022, 10:45 AM

Nice clean up! Looks fine to me as long as the extra setHasBoundedRewriteRecursion is addressed.

mlir/lib/Dialect/Vector/Transforms/VectorInsertExtractStridedSliceRewritePatterns.cpp
247

I don't think this is needed anymore.

This revision is now accepted and ready to land.Apr 5 2022, 10:45 AM
This revision was landed with ongoing or failed builds.Apr 5 2022, 12:01 PM
This revision was automatically updated to reflect the committed changes.