[llvm-commits] [llvm] r110452 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Aug 6 11:04:14 PDT 2010


Author: stoklund
Date: Fri Aug  6 13:04:14 2010
New Revision: 110452

URL: http://llvm.org/viewvc/llvm-project?rev=110452&view=rev
Log:
Don't try to verify LiveIntervals for physical registers.

When a physical register is in use, some alias of that register has a live
interval with a relevant live range. That is the sad state of intervals after
physreg coalescing of subregs, and it is good enough for correct register
allocation.

Modified:
    llvm/trunk/lib/CodeGen/MachineVerifier.cpp

Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=110452&r1=110451&r2=110452&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Fri Aug  6 13:04:14 2010
@@ -630,8 +630,9 @@
       else
         addRegWithSubRegs(regsDefined, Reg);
 
-      // Check LiveInts for a live range.
-      if (LiveInts && !LiveInts->isNotInMIMap(MI)) {
+      // Check LiveInts for a live range, but only for virtual registers.
+      if (LiveInts && TargetRegisterInfo::isVirtualRegister(Reg) &&
+          !LiveInts->isNotInMIMap(MI)) {
         SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getDefIndex();
         if (LiveInts->hasInterval(Reg)) {
           const LiveInterval &LI = LiveInts->getInterval(Reg);
@@ -642,16 +643,11 @@
               *OS << "Valno " << LR->valno->id << " is not defined at "
                   << DefIdx << " in " << LI << '\n';
             }
-            if (LR->start != DefIdx) {
-              report("Live range doesn't start at def", MO, MONum);
-              LR->print(*OS);
-              *OS << " should start at " << DefIdx << " in " << LI << '\n';
-            }
           } else {
             report("No live range at def", MO, MONum);
             *OS << DefIdx << " is not live in " << LI << '\n';
           }
-        } else if (TargetRegisterInfo::isVirtualRegister(Reg)) {
+        } else {
           report("Virtual register has no Live interval", MO, MONum);
         }
       }





More information about the llvm-commits mailing list