[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed Sep 1 15:35:03 PDT 2004



Changes in directory llvm/lib/CodeGen:

LiveVariables.cpp updated: 1.42 -> 1.43
---
Log message:

Give a better assertion if we see a use before a def.


---
Diffs of the changes:  (+2 -0)

Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.42 llvm/lib/CodeGen/LiveVariables.cpp:1.43
--- llvm/lib/CodeGen/LiveVariables.cpp:1.42	Sat Aug 28 17:43:31 2004
+++ llvm/lib/CodeGen/LiveVariables.cpp	Wed Sep  1 17:34:52 2004
@@ -82,6 +82,8 @@
 
 void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
                                      MachineInstr *MI) {
+  assert(VRInfo.DefInst && "Register use before def!");
+
   // Check to see if this basic block is already a kill block...
   if (!VRInfo.Kills.empty() && VRInfo.Kills.back()->getParent() == MBB) {
     // Yes, this register is killed in this basic block already.  Increase the






More information about the llvm-commits mailing list