diff options
| author | Matthias Springer <me@m-sp.org> | 2025-01-21 08:48:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-21 08:48:09 +0100 |
| commit | 6aaa8f25b66dc1fef4e465f274ee40b82d632988 (patch) | |
| tree | 7b3dfc33ae1879a3ce00af7e5019efbcc72918d5 /mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp | |
| parent | 79231a86846b7dff09497fc58ea1e82e892052bd (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.cpp | 6 |
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); |
