Define a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
[oota-llvm.git] / lib / CodeGen / LiveRangeCalc.cpp
index 21eaa15d01226502078b5abc9c0ceb41ec15411b..d8ab7918ae25fafbb8f1bbd630c7ec96952e890e 100644 (file)
@@ -47,7 +47,7 @@ void LiveRangeCalc::updateLiveIns(VNInfo *OverrideVNI, SlotIndexes *Indexes) {
       // The value is live-through, update LiveOut as well.  Defer the Domtree
       // lookup until it is needed.
       assert(Seen.test(MBB->getNumber()));
-      LiveOut[MBB] = LiveOutPair(VNI, 0);
+      LiveOut[MBB] = LiveOutPair(VNI, (MachineDomTreeNode *)0);
     }
   }
   LiveIn.clear();
@@ -63,13 +63,12 @@ void LiveRangeCalc::extend(LiveInterval *LI,
   assert(Kill.isValid() && "Invalid SlotIndex");
   assert(Indexes && "Missing SlotIndexes");
   assert(DomTree && "Missing dominator tree");
-  SlotIndex LastUse = Kill.getPrevSlot();
 
-  MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(LastUse);
-  assert(Kill && "No MBB at Kill");
+  MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(Kill.getPrevSlot());
+  assert(KillMBB && "No MBB at Kill");
 
   // Is there a def in the same MBB we can extend?
-  if (LI->extendInBlock(Indexes->getMBBStartIdx(KillMBB), LastUse))
+  if (LI->extendInBlock(Indexes->getMBBStartIdx(KillMBB), Kill))
     return;
 
   // Find the single reaching def, or determine if Kill is jointly dominated by
@@ -134,7 +133,7 @@ VNInfo *LiveRangeCalc::findReachingDefs(LiveInterval *LI,
 
        // First time we see Pred.  Try to determine the live-out value, but set
        // it as null if Pred is live-through with an unknown value.
-       VNInfo *VNI = LI->extendInBlock(Start, End.getPrevSlot());
+       VNInfo *VNI = LI->extendInBlock(Start, End);
        setLiveOutValue(Pred, VNI);
        if (VNI) {
          if (TheVNI && TheVNI != VNI)
@@ -238,7 +237,7 @@ void LiveRangeCalc::updateSSA(SlotIndexes *Indexes,
         assert(Alloc && "Need VNInfo allocator to create PHI-defs");
         SlotIndex Start, End;
         tie(Start, End) = Indexes->getMBBRange(MBB);
-        VNInfo *VNI = I->LI->getNextValue(Start, 0, *Alloc);
+        VNInfo *VNI = I->LI->getNextValue(Start, *Alloc);
         VNI->setIsPHIDef(true);
         I->Value = VNI;
         // This block is done, we know the final value.