Lines Matching refs:NewIdx
713 SlotIndex NewIdx;
720 SlotIndex OldIdx, SlotIndex NewIdx, bool UpdateFlags)
721 : LIS(LIS), MRI(MRI), TRI(TRI), OldIdx(OldIdx), NewIdx(NewIdx),
735 /// NewIdx.
737 DEBUG(dbgs() << "handleMove " << OldIdx << " -> " << NewIdx << ": " << *MI);
769 /// OldIdx to NewIdx.
781 if (SlotIndex::isEarlierInstr(OldIdx, NewIdx))
790 /// to NewIdx.
793 /// Move def to NewIdx, assert endpoint after NewIdx.
795 /// 2. Live def at OldIdx, killed at NewIdx:
796 /// Change to dead def at NewIdx.
800 /// Move def to NewIdx, possibly across another live value.
802 /// 4. Def at OldIdx AND at NewIdx:
803 /// Remove live range [OldIdx;NewIdx) and value defined at OldIdx.
806 /// 5. Value read at OldIdx, killed before NewIdx:
807 /// Extend kill to NewIdx.
820 // If the live-in value already extends to NewIdx, there is nothing to do.
821 if (!SlotIndex::isEarlierInstr(I->end, NewIdx))
830 // Adjust I->end to reach NewIdx. This may temporarily make LI invalid by
832 I->end = NewIdx.getRegSlot(I->end.isEarlyClobber());
845 DefVNI->def = NewIdx.getRegSlot(I->start.isEarlyClobber());
846 // If the defined value extends beyond NewIdx, just move the def down.
848 if (SlotIndex::isEarlierInstr(NewIdx, I->end)) {
853 // 2. Live def at OldIdx, killed at NewIdx: isSameInstr(I->end, NewIdx).
855 // In either case, it is possible that there is an existing def at NewIdx.
857 SlotIndex::isSameInstr(I->end, NewIdx)) &&
859 LiveInterval::iterator NewI = LI.advanceTo(I, NewIdx.getRegSlot());
860 if (NewI != E && SlotIndex::isSameInstr(NewI->start, NewIdx)) {
861 // There is an existing def at NewIdx, case 4 above. The def at OldIdx is
867 // There was no existing def at NewIdx. Turn *I into a dead def at NewIdx.
873 *llvm::prior(NewI) = LiveRange(DefVNI->def, NewIdx.getDeadSlot(), DefVNI);
877 /// to NewIdx.
880 /// Hoist def to NewIdx.
883 /// Hoist def+end to NewIdx, possibly move across other values.
885 /// 3. Dead def at OldIdx AND existing def at NewIdx:
888 /// 4. Live def at OldIdx AND existing def at NewIdx:
889 /// Remove value defined at NewIdx, hoist OldIdx def to NewIdx.
893 /// Hoist kill to NewIdx, then scan for last kill between NewIdx and
909 // Adjust I->end to end at NewIdx. If we are hoisting a kill above
911 I->end = NewIdx.getRegSlot(I->end.isEarlyClobber());
926 DefVNI->def = NewIdx.getRegSlot(I->start.isEarlyClobber());
928 // Check for an existing def at NewIdx.
929 LiveInterval::iterator NewI = LI.find(NewIdx.getRegSlot());
930 if (SlotIndex::isSameInstr(NewI->start, NewIdx)) {
932 // There is an existing def at NewIdx.
938 // Case 4: Replace def at NewIdx with live def at OldIdx.
944 // There is no existing def at NewIdx. Hoist DefVNI.
954 *NewI = LiveRange(DefVNI->def, NewIdx.getDeadSlot(), DefVNI);
963 *RI = NewIdx.getRegSlot();
972 // Return the last use of reg between NewIdx and OldIdx.
976 SlotIndex LastUse = NewIdx;
991 assert(NewIdx < OldIdx && "Expected upwards move");
993 MachineBasicBlock *MBB = Indexes->getMBBFromIndex(NewIdx);
1009 // Stop searching when NewIdx is reached.
1010 if (!SlotIndex::isEarlierInstr(NewIdx, Idx))
1011 return NewIdx;
1020 // Didn't reach NewIdx. It must be the first instruction in the block.
1021 return NewIdx;