[Mlir-commits] [mlir] [mlir][Transforms] `GreedyPatternRewriteDriver`: log successful folding (PR #77796)

Mehdi Amini llvmlistbot at llvm.org
Thu Jan 11 08:48:09 PST 2024


================
@@ -136,6 +136,17 @@ struct DebugFingerPrints : public RewriterBase::ForwardingListener {
 };
 #endif // MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS
 
+#ifndef NDEBUG
+static Operation *getDumpRootOp(Operation *op) {
+  return op->getParentWithTrait<mlir::OpTrait::IsIsolatedFromAbove>();
----------------
joker-eph wrote:

Seems to me that this would be arbitrarily large for something to be printed after each folding (think a long function...)

https://github.com/llvm/llvm-project/pull/77796


More information about the Mlir-commits mailing list