Assert that all MachineInstrs update PhysRegUseDefLists in
authorDan Gohman <gohman@apple.com>
Mon, 7 Jul 2008 19:55:35 +0000 (19:55 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 7 Jul 2008 19:55:35 +0000 (19:55 +0000)
their cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53194 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineRegisterInfo.cpp

index b3ee0358bb1686e68d36cd1661ffb7eafad04357..c247a22d23e70a00059b0d274820a0c08570de73 100644 (file)
@@ -27,6 +27,9 @@ MachineRegisterInfo::~MachineRegisterInfo() {
 #ifndef NDEBUG
   for (unsigned i = 0, e = VRegInfo.size(); i != e; ++i)
     assert(VRegInfo[i].second == 0 && "Vreg use list non-empty still?");
+  for (unsigned i = 0, e = UsedPhysRegs.size(); i != e; ++i)
+    assert(!PhysRegUseDefLists[i] &&
+           "PhysRegUseDefLists has entries after all instructions are deleted");
 #endif
   delete [] PhysRegUseDefLists;
 }