Give better scavenger errors by invoking the verifier.

llvm-svn: 148251
This commit is contained in:
Jakob Stoklund Olesen 2012-01-16 20:38:31 +00:00
parent 374ed322f2
commit 6de6d3e4ec
1 changed files with 6 additions and 1 deletions

View File

@ -205,7 +205,12 @@ void RegScavenger::forward() {
SubUsed = true;
break;
}
assert(SubUsed && "Using an undefined register!");
#ifndef NDEBUG
if (!SubUsed) {
MBB->getParent()->verify(NULL, "In Register Scavenger");
llvm_unreachable("Using an undefined register!");
}
#endif
(void)SubUsed;
}
assert((!EarlyClobberRegs.test(Reg) || MI->isRegTiedToDefOperand(i)) &&