X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FLiveRangeCalc.cpp;h=a7d5af5198e5fbf4ef96eb2569abee8162ebd49b;hb=df234353fb396e84e7a3a1cdd94f73681e65bd88;hp=eedf924388e1196350eafdbe7c4b6ee77446b93f;hpb=edd4f8ba4bed5b999c6a726b7991241cf1840350;p=oota-llvm.git diff --git a/lib/CodeGen/LiveRangeCalc.cpp b/lib/CodeGen/LiveRangeCalc.cpp index eedf924388e..a7d5af5198e 100644 --- a/lib/CodeGen/LiveRangeCalc.cpp +++ b/lib/CodeGen/LiveRangeCalc.cpp @@ -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); + MachineBasicBlock *KillMBB = Indexes->getMBBFromIndex(Kill.getPrevSlot()); assert(Kill && "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)