forked from OSchip/llvm-project
Log name of the generated illegal operation name in DialectConversion debug mode
PiperOrigin-RevId: 268859399
This commit is contained in:
parent
2ccbb3f1ce
commit
1854c64c7c
|
@ -820,8 +820,10 @@ OperationLegalizer::legalizePattern(Operation *op, RewritePattern *pattern,
|
||||||
for (unsigned i = curState.numCreatedOperations,
|
for (unsigned i = curState.numCreatedOperations,
|
||||||
e = rewriterImpl.createdOps.size();
|
e = rewriterImpl.createdOps.size();
|
||||||
i != e; ++i) {
|
i != e; ++i) {
|
||||||
if (failed(legalize(rewriterImpl.createdOps[i], rewriter))) {
|
Operation *op = rewriterImpl.createdOps[i];
|
||||||
LLVM_DEBUG(llvm::dbgs() << "-- FAIL: Generated operation was illegal.\n");
|
if (failed(legalize(op, rewriter))) {
|
||||||
|
LLVM_DEBUG(llvm::dbgs() << "-- FAIL: Generated operation '"
|
||||||
|
<< op->getName() << "' was illegal.\n");
|
||||||
return cleanupFailure();
|
return cleanupFailure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue