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

This commit is contained in:
Yuanqiang Liu 2024-01-15 07:58:32 +08:00 committed by GitHub
parent bddd8f46f8
commit 510ec2079e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";
});
}