mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
Don't emit on op diagnostic in reproducer emission
This avoids dumping the module post emitting a reproducer, which results in many MB logs where a reproducer has already been neatly generated. Differential Revision: https://reviews.llvm.org/D93165
This commit is contained in:
@@ -765,10 +765,14 @@ PassManager::runWithCrashRecovery(MutableArrayRef<std::unique_ptr<Pass>> passes,
|
||||
std::string error;
|
||||
if (failed(context.generate(error)))
|
||||
return op->emitError("<MLIR-PassManager-Crash-Reproducer>: ") << error;
|
||||
return op->emitError()
|
||||
<< "A failure has been detected while processing the MLIR module, a "
|
||||
"reproducer has been generated in '"
|
||||
<< *crashReproducerFileName << "'";
|
||||
bool shouldPrintOnOp = op->getContext()->shouldPrintOpOnDiagnostic();
|
||||
op->getContext()->printOpOnDiagnostic(false);
|
||||
op->emitError()
|
||||
<< "A failure has been detected while processing the MLIR module, a "
|
||||
"reproducer has been generated in '"
|
||||
<< *crashReproducerFileName << "'";
|
||||
op->getContext()->printOpOnDiagnostic(shouldPrintOnOp);
|
||||
return failure();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user