Remmeber to print full live interval on verification error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117391 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2010-10-26 20:21:43 +00:00
parent 61e3b91da7
commit dbcc2e119d

View File

@ -920,14 +920,15 @@ void MachineVerifier::verifyLiveIntervals() {
if (DefVNI != VNI) { if (DefVNI != VNI) {
report("Live range at def has different valno", MF); report("Live range at def has different valno", MF);
*OS << "Valno #" << VNI->id << " is defined at " << VNI->def *OS << "Valno #" << VNI->id << " is defined at " << VNI->def
<< " where valno #" << DefVNI->id << " is live.\n"; << " where valno #" << DefVNI->id << " is live in " << LI << '\n';
continue; continue;
} }
const MachineBasicBlock *MBB = LiveInts->getMBBFromIndex(VNI->def); const MachineBasicBlock *MBB = LiveInts->getMBBFromIndex(VNI->def);
if (!MBB) { if (!MBB) {
report("Invalid definition index", MF); report("Invalid definition index", MF);
*OS << "Valno #" << VNI->id << " is defined at " << VNI->def << '\n'; *OS << "Valno #" << VNI->id << " is defined at " << VNI->def
<< " in " << LI << '\n';
continue; continue;
} }
@ -935,13 +936,15 @@ void MachineVerifier::verifyLiveIntervals() {
if (VNI->def != LiveInts->getMBBStartIdx(MBB)) { if (VNI->def != LiveInts->getMBBStartIdx(MBB)) {
report("PHIDef value is not defined at MBB start", MF); report("PHIDef value is not defined at MBB start", MF);
*OS << "Valno #" << VNI->id << " is defined at " << VNI->def *OS << "Valno #" << VNI->id << " is defined at " << VNI->def
<< ", not at the beginning of BB#" << MBB->getNumber() << '\n'; << ", not at the beginning of BB#" << MBB->getNumber()
<< " in " << LI << '\n';
} }
} else { } else {
// Non-PHI def. // Non-PHI def.
if (!VNI->def.isDef()) { if (!VNI->def.isDef()) {
report("Non-PHI def must be at a DEF slot", MF); report("Non-PHI def must be at a DEF slot", MF);
*OS << "Valno #" << VNI->id << " is defined at " << VNI->def << '\n'; *OS << "Valno #" << VNI->id << " is defined at " << VNI->def
<< " in " << LI << '\n';
} }
const MachineInstr *MI = LiveInts->getInstructionFromIndex(VNI->def); const MachineInstr *MI = LiveInts->getInstructionFromIndex(VNI->def);
if (!MI) { if (!MI) {