[Mlir-commits] [mlir] [mlir][NFC] Correct pattern names to match the behaviors. (PR #158177)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Sep 11 19:46:28 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Han-Chung Wang (hanhanW)
<details>
<summary>Changes</summary>
It is a follow-up for https://github.com/llvm/llvm-project/pull/131982#discussion_r2286014576 and https://github.com/llvm/llvm-project/pull/126898#discussion_r2286013250.
The names do not match the behaviors, and the revision updates the names.
---
Full diff: https://github.com/llvm/llvm-project/pull/158177.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp (+4-4)
``````````diff
diff --git a/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp b/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
index dfce835a1954b..7ec61c7df81cf 100644
--- a/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
+++ b/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
@@ -319,7 +319,7 @@ struct BubbleUpExpandThroughParallelCollapse
/// Note - this pattern could be extended to be a swap pattern between
/// `tensor.expand_shape` and `tensor.extract_slice`, but is currently
/// implemented only as a bubble up pattern for `tensor.extract_slice`.
-struct BubbleUpExpandShapeThroughExtractSlice
+struct BubbleUpExtractSliceThroughExpandShape
: public OpRewritePattern<tensor::ExtractSliceOp> {
using OpRewritePattern<tensor::ExtractSliceOp>::OpRewritePattern;
@@ -427,7 +427,7 @@ struct BubbleUpExpandShapeThroughExtractSlice
/// to tensor<15xf32>
/// ```
/// But this is not the intended purpose of the transformation.
-struct BubbleUpCollapseShapeThroughExtractSlice
+struct BubbleUpExtractSliceThroughCollapseShape
: public OpRewritePattern<tensor::ExtractSliceOp> {
using OpRewritePattern<tensor::ExtractSliceOp>::OpRewritePattern;
@@ -735,6 +735,6 @@ void mlir::tensor::populateBubbleUpExpandShapePatterns(
void mlir::tensor::populateBubbleUpExtractSliceOpPatterns(
RewritePatternSet &patterns) {
- patterns.add<BubbleUpExpandShapeThroughExtractSlice,
- BubbleUpCollapseShapeThroughExtractSlice>(patterns.getContext());
+ patterns.add<BubbleUpExtractSliceThroughExpandShape,
+ BubbleUpExtractSliceThroughCollapseShape>(patterns.getContext());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/158177
More information about the Mlir-commits
mailing list