[Mlir-commits] [mlir] [mlir] Allow folding dynamic full size subviews (PR #140619)
Matthias Springer
llvmlistbot at llvm.org
Tue May 20 23:17:47 PDT 2025
================
@@ -3206,7 +3215,7 @@ class TrivialSubViewOpFolder final : public OpRewritePattern<SubViewOp> {
LogicalResult matchAndRewrite(SubViewOp subViewOp,
PatternRewriter &rewriter) const override {
- if (!isTrivialSubViewOp(subViewOp))
+ if (!isTrivialSubViewOp(rewriter, subViewOp))
return failure();
----------------
matthias-springer wrote:
I wouldn't use `ValueBoundsOpInterface` during canonicalization. It is quite expensive and should probably removed from the canonicalization patterns that use it today.
I don't have a good solution. Maybe we can build a new pass that folds various index computations and view-like ops based on a single `ValueBoundsOpInterface` analysis. Maybe that pass could then also replace the "reify ranked shaped ..." pass. Not sure if it's a good idea, just trying to think of a solution...
https://github.com/llvm/llvm-project/pull/140619
More information about the Mlir-commits
mailing list