[Mlir-commits] [mlir] 510ec20 - [mlir] fix IRPrinterInstrumentation to use the user-provided IRPrinting config (#70023)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Jan 14 15:58:36 PST 2024


Author: Yuanqiang Liu
Date: 2024-01-14T15:58:32-08:00
New Revision: 510ec2079e8fe9d6705466ecfbd3e91f5798998a

URL: https://github.com/llvm/llvm-project/commit/510ec2079e8fe9d6705466ecfbd3e91f5798998a
DIFF: https://github.com/llvm/llvm-project/commit/510ec2079e8fe9d6705466ecfbd3e91f5798998a.diff

LOG: [mlir] fix IRPrinterInstrumentation to use the user-provided IRPrinting config (#70023)

Added: 
    

Modified: 
    mlir/lib/Pass/IRPrinting.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Pass/IRPrinting.cpp b/mlir/lib/Pass/IRPrinting.cpp
index ee52bf81847c23..72b94eeb0123fc 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";
   });
 }


        


More information about the Mlir-commits mailing list