[Mlir-commits] [mlir] [mlir][NFC] Correct pattern names to match the behaviors. (PR #158177)
Han-Chung Wang
llvmlistbot at llvm.org
Thu Sep 11 19:45:53 PDT 2025
https://github.com/hanhanW created https://github.com/llvm/llvm-project/pull/158177
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.
>From 99a48ba2905a9d827aa8a6e1e49e1d83f84fbad0 Mon Sep 17 00:00:00 2001
From: hanhanW <hanhan0912 at gmail.com>
Date: Thu, 11 Sep 2025 19:42:59 -0700
Subject: [PATCH] [mlir][NFC] Correct pattern names to match the behaviors.
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.
Signed-off-by: hanhanW <hanhan0912 at gmail.com>
---
mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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());
}
More information about the Mlir-commits
mailing list