diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 2 | 
4 files changed, 7 insertions, 8 deletions
| diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 3341ae1bbbf..59907d9c4e0 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/lib/CodeGen/InlineSpiller.cpp @@ -810,7 +810,7 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {        MachineBasicBlock *MBB = LIS.getMBBFromIndex(VNI->def);        for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(),               PE = MBB->pred_end(); PI != PE; ++PI) { -        VNInfo *PVNI = LI->getVNInfoAt(LIS.getMBBEndIdx(*PI).getPrevSlot()); +        VNInfo *PVNI = LI->getVNInfoBefore(LIS.getMBBEndIdx(*PI));          if (PVNI)            WorkList.push_back(std::make_pair(LI, PVNI));        } diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index 42e122efbe3..a85639f9c19 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -680,15 +680,14 @@ unsigned ConnectedVNInfoEqClasses::Classify(const LiveInterval *LI) {        // Connect to values live out of predecessors.        for (MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(),             PE = MBB->pred_end(); PI != PE; ++PI) -        if (const VNInfo *PVNI = -              LI->getVNInfoAt(LIS.getMBBEndIdx(*PI).getPrevSlot())) +        if (const VNInfo *PVNI = LI->getVNInfoBefore(LIS.getMBBEndIdx(*PI)))            EqClass.join(VNI->id, PVNI->id);      } else {        // Normal value defined by an instruction. Check for two-addr redef.        // FIXME: This could be coincidental. Should we really check for a tied        // operand constraint?        // Note that VNI->def may be a use slot for an early clobber def. -      if (const VNInfo *UVNI = LI->getVNInfoAt(VNI->def.getPrevSlot())) +      if (const VNInfo *UVNI = LI->getVNInfoBefore(VNI->def))          EqClass.join(VNI->id, UVNI->id);      }    } diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index b36aab3d89c..b3c28b0eb3a 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -1193,8 +1193,8 @@ void MachineVerifier::verifyLiveIntervals() {          // Check that VNI is live-out of all predecessors.          for (MachineBasicBlock::const_pred_iterator PI = MFI->pred_begin(),               PE = MFI->pred_end(); PI != PE; ++PI) { -          SlotIndex PEnd = LiveInts->getMBBEndIdx(*PI).getPrevSlot(); -          const VNInfo *PVNI = LI.getVNInfoAt(PEnd); +          SlotIndex PEnd = LiveInts->getMBBEndIdx(*PI); +          const VNInfo *PVNI = LI.getVNInfoBefore(PEnd);            if (VNI->isPHIDef() && VNI->def == LiveInts->getMBBStartIdx(MFI))              continue; @@ -1202,7 +1202,7 @@ void MachineVerifier::verifyLiveIntervals() {            if (!PVNI) {              report("Register not marked live out of predecessor", *PI);              *OS << "Valno #" << VNI->id << " live into BB#" << MFI->getNumber() -                << '@' << LiveInts->getMBBStartIdx(MFI) << ", not live at " +                << '@' << LiveInts->getMBBStartIdx(MFI) << ", not live before "                  << PEnd << " in " << LI << '\n';              continue;            } diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 6c46d53bf1f..751d604cd3d 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -586,7 +586,7 @@ SlotIndex SplitEditor::leaveIntvAtTop(MachineBasicBlock &MBB) {  void SplitEditor::overlapIntv(SlotIndex Start, SlotIndex End) {    assert(OpenIdx && "openIntv not called before overlapIntv");    const VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start); -  assert(ParentVNI == Edit->getParent().getVNInfoAt(End.getPrevSlot()) && +  assert(ParentVNI == Edit->getParent().getVNInfoBefore(End) &&           "Parent changes value in extended range");    assert(LIS.getMBBFromIndex(Start) == LIS.getMBBFromIndex(End) &&           "Range cannot span basic blocks"); | 

