diff options
| author | Cameron Zwarich <zwarich@apple.com> | 2010-12-28 23:45:38 +0000 | 
|---|---|---|
| committer | Cameron Zwarich <zwarich@apple.com> | 2010-12-28 23:45:38 +0000 | 
| commit | 6fe33fdd6336be4a775c82e0d2f49f73f21d438d (patch) | |
| tree | 132e9134690da7c5a006893031bd6f6bd1e9eb3a /llvm | |
| parent | 6bbfb6c06c1096933eaf1fee0abf8d83ba85c119 (diff) | |
| download | bcm5719-llvm-6fe33fdd6336be4a775c82e0d2f49f73f21d438d.tar.gz bcm5719-llvm-6fe33fdd6336be4a775c82e0d2f49f73f21d438d.zip  | |
Simplify some code in MachineVerifier that was doing the correct thing, but not
in the most obvious way.
llvm-svn: 122610
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 0c299690039..53e04cea2b7 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -1118,8 +1118,8 @@ void MachineVerifier::verifyLiveIntervals() {        // Now check all the basic blocks in this live segment.        MachineFunction::const_iterator MFI = MBB; -      // Is LI live-in to MBB and not a PHIDef? -      if (I->start == VNI->def) { +      // Is this live range the beginning of a non-PHIDef VN? +      if (I->start == VNI->def && !VNI->isPHIDef()) {          // Not live-in to any blocks.          if (MBB == EndMBB)            continue; @@ -1141,16 +1141,9 @@ void MachineVerifier::verifyLiveIntervals() {               PE = MFI->pred_end(); PI != PE; ++PI) {            SlotIndex PEnd = LiveInts->getMBBEndIdx(*PI).getPrevSlot();            const VNInfo *PVNI = LI.getVNInfoAt(PEnd); -          if (!PVNI) { -            report("Register not marked live out of predecessor", *PI); -            *OS << "Valno #" << VNI->id << " live into BB#" << MFI->getNumber() -                << '@' << LiveInts->getMBBStartIdx(MFI) << ", not live at " -                << PEnd << " in " << LI << '\n'; -            continue; -          }            if (VNI->isPHIDef() && VNI->def == LiveInts->getMBBStartIdx(MFI)) { -            if (!PVNI->hasPHIKill()) { +            if (PVNI && !PVNI->hasPHIKill()) {                report("Value live out of predecessor doesn't have PHIKill", MF);                *OS << "Valno #" << PVNI->id << " live out of BB#"                    << (*PI)->getNumber() << '@' << PEnd @@ -1162,6 +1155,14 @@ void MachineVerifier::verifyLiveIntervals() {              continue;            } +          if (!PVNI) { +            report("Register not marked live out of predecessor", *PI); +            *OS << "Valno #" << VNI->id << " live into BB#" << MFI->getNumber() +                << '@' << LiveInts->getMBBStartIdx(MFI) << ", not live at " +                << PEnd << " in " << LI << '\n'; +            continue; +          } +            if (PVNI != VNI) {              report("Different value live out of predecessor", *PI);              *OS << "Valno #" << PVNI->id << " live out of BB#"  | 

