[llvm-commits] [llvm] r148251 - /llvm/trunk/lib/CodeGen/RegisterScavenging.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jan 16 12:38:31 PST 2012


Author: stoklund
Date: Mon Jan 16 14:38:31 2012
New Revision: 148251

URL: http://llvm.org/viewvc/llvm-project?rev=148251&view=rev
Log:
Give better scavenger errors by invoking the verifier.

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

Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=148251&r1=148250&r2=148251&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Mon Jan 16 14:38:31 2012
@@ -205,7 +205,12 @@
             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)) &&





More information about the llvm-commits mailing list