[Mlir-commits] [mlir] [mlir][vector] Add pattern to rewrite contiguous ExtractStridedSlice into Extract (PR #111541)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 8 15:37:35 PDT 2024
================
@@ -235,6 +235,11 @@ void populateVectorExtractStridedSliceToExtractInsertChainPatterns(
std::function<bool(ExtractStridedSliceOp)> controlFn = nullptr,
PatternBenefit benefit = 1);
+/// Pattern to rewrite simple cases of N-D extract_strided_slice, where the
+/// slice is contiguous, into extract and shape_cast.
+void populateVectorContiguousExtractStridedSliceToExtractPatterns(
+ RewritePatternSet &patterns, PatternBenefit benefit = 1);
----------------
MaheshRavishankar wrote:
> If this can't be grouped in a cohesive pass that achieve something meaningful that we can reason about, then yeah please keep all these patterns out-of-tree.
At the risk of duplication in all downstream projects? I am fine with that if that is the consensus, but IMO many times, the "pattern" across patterns only appears when they are all put in the same place, i.e. it is not always possible to have overarching plans for everything from the get go, but rather you build that intuition over time.
https://github.com/llvm/llvm-project/pull/111541
More information about the Mlir-commits
mailing list