[Mlir-commits] [mlir] 54a799c - [mlir][linalg] Use TrackingListener for VectorizeOp

Matthias Springer llvmlistbot at llvm.org
Wed Apr 5 20:57:41 PDT 2023


Author: Matthias Springer
Date: 2023-04-06T12:53:29+09:00
New Revision: 54a799c4aa7a1041d08c331c602ba943fa383566

URL: https://github.com/llvm/llvm-project/commit/54a799c4aa7a1041d08c331c602ba943fa383566
DIFF: https://github.com/llvm/llvm-project/commit/54a799c4aa7a1041d08c331c602ba943fa383566.diff

LOG: [mlir][linalg] Use TrackingListener for VectorizeOp

This is needed so that the transform dialect interpreter is notified about deleted payload ops.

Differential Revision: https://reviews.llvm.org/D147430

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index 56972a9a328e5..e548615ddecbf 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -23,6 +23,7 @@
 #include "mlir/Dialect/Tensor/Utils/Utils.h"
 #include "mlir/Dialect/Transform/IR/TransformDialect.h"
 #include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
+#include "mlir/Dialect/Transform/IR/TransformOps.h"
 #include "mlir/Dialect/Transform/IR/TransformTypes.h"
 #include "mlir/Dialect/Transform/Utils/Utils.h"
 #include "mlir/Dialect/Utils/IndexingUtils.h"
@@ -3066,7 +3067,10 @@ transform::VectorizeOp::applyToOne(Operation *target,
   if (getVectorizePadding())
     linalg::populatePadOpVectorizationPatterns(patterns);
 
-  if (failed(applyPatternsAndFoldGreedily(target, std::move(patterns))))
+  TrackingListener listener(state);
+  GreedyRewriteConfig config;
+  config.listener = &listener;
+  if (failed(applyPatternsAndFoldGreedily(target, std::move(patterns), config)))
     return emitDefaultDefiniteFailure(target);
 
   results.push_back(target);


        


More information about the Mlir-commits mailing list