From 510ec2079e8fe9d6705466ecfbd3e91f5798998a Mon Sep 17 00:00:00 2001 From: Yuanqiang Liu Date: Mon, 15 Jan 2024 07:58:32 +0800 Subject: [PATCH] [mlir] fix IRPrinterInstrumentation to use the user-provided IRPrinting config (#70023) --- mlir/lib/Pass/IRPrinting.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlir/lib/Pass/IRPrinting.cpp b/mlir/lib/Pass/IRPrinting.cpp index ee52bf81847c..72b94eeb0123 100644 --- a/mlir/lib/Pass/IRPrinting.cpp +++ b/mlir/lib/Pass/IRPrinting.cpp @@ -119,7 +119,8 @@ void IRPrinterInstrumentation::runAfterPassFailed(Pass *pass, Operation *op) { config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) { out << formatv("// -----// IR Dump After {0} Failed ({1})", pass->getName(), pass->getArgument()); - printIR(op, config->shouldPrintAtModuleScope(), out, OpPrintingFlags()); + printIR(op, config->shouldPrintAtModuleScope(), out, + config->getOpPrintingFlags()); out << "\n\n"; }); }