[llvm-commits] [llvm] r121410 - in /llvm/trunk/lib/CodeGen: LiveIntervalUnion.cpp LiveIntervalUnion.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Dec 9 13:20:44 PST 2010


Author: stoklund
Date: Thu Dec  9 15:20:44 2010
New Revision: 121410

URL: http://llvm.org/viewvc/llvm-project?rev=121410&view=rev
Log:
Add a forgotten initializer for CheckedFirstInterference.

Modified:
    llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp
    llvm/trunk/lib/CodeGen/LiveIntervalUnion.h

Modified: llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp?rev=121410&r1=121409&r2=121410&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalUnion.cpp Thu Dec  9 15:20:44 2010
@@ -168,6 +168,8 @@
       IR.VirtRegI = VirtReg->end();
   }
   findIntersection(FirstInterference);
+  assert((IR.VirtRegI == VirtReg->end() || IR.LiveUnionI.valid())
+         && "Uninitialized iterator");
   return FirstInterference;
 }
 

Modified: llvm/trunk/lib/CodeGen/LiveIntervalUnion.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalUnion.h?rev=121410&r1=121409&r2=121410&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalUnion.h (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalUnion.h Thu Dec  9 15:20:44 2010
@@ -145,8 +145,8 @@
     Query(): LiveUnion(), VirtReg() {}
 
     Query(LiveInterval *VReg, LiveIntervalUnion *LIU):
-      LiveUnion(LIU), VirtReg(VReg), SeenAllInterferences(false),
-      SeenUnspillableVReg(false)
+      LiveUnion(LIU), VirtReg(VReg), CheckedFirstInterference(false),
+      SeenAllInterferences(false), SeenUnspillableVReg(false)
     {}
 
     void clear() {
@@ -159,6 +159,7 @@
     }
 
     void init(LiveInterval *VReg, LiveIntervalUnion *LIU) {
+      assert(VReg && LIU && "Invalid arguments");
       if (VirtReg == VReg && LiveUnion == LIU) {
         // Retain cached results, e.g. firstInterference.
         return;





More information about the llvm-commits mailing list