summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2025-01-21 08:48:09 +0100
committerGitHub <noreply@github.com>2025-01-21 08:48:09 +0100
commit6aaa8f25b66dc1fef4e465f274ee40b82d632988 (patch)
tree7b3dfc33ae1879a3ce00af7e5019efbcc72918d5 /mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
parent79231a86846b7dff09497fc58ea1e82e892052bd (diff)
[mlir][IR][NFC] Move free-standing functions to `MemRefType` (#123465)
Turn free-standing `MemRefType`-related helper functions in `BuiltinTypes.h` into member functions.
Diffstat (limited to 'mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp')
-rw-r--r--mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
index b0892d16969d..5871d6dd5b3e 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
@@ -267,7 +267,7 @@ static MemRefType dropUnitDims(MemRefType inputType,
auto targetShape = getReducedShape(sizes);
Type rankReducedType = memref::SubViewOp::inferRankReducedResultType(
targetShape, inputType, offsets, sizes, strides);
- return canonicalizeStridedLayout(cast<MemRefType>(rankReducedType));
+ return cast<MemRefType>(rankReducedType).canonicalizeStridedLayout();
}
/// Creates a rank-reducing memref.subview op that drops unit dims from its
@@ -283,8 +283,8 @@ static Value rankReducingSubviewDroppingUnitDims(PatternRewriter &rewriter,
rewriter.getIndexAttr(1));
MemRefType resultType = dropUnitDims(inputType, offsets, sizes, strides);
- if (canonicalizeStridedLayout(resultType) ==
- canonicalizeStridedLayout(inputType))
+ if (resultType.canonicalizeStridedLayout() ==
+ inputType.canonicalizeStridedLayout())
return input;
return rewriter.create<memref::SubViewOp>(loc, resultType, input, offsets,
sizes, strides);