Lines Matching defs:OldIdx

728   SlotIndex OldIdx;
736 SlotIndex OldIdx, SlotIndex NewIdx, bool UpdateFlags)
737 : LIS(LIS), MRI(MRI), TRI(TRI), OldIdx(OldIdx), NewIdx(NewIdx),
750 /// Update all live ranges touched by MI, assuming a move from OldIdx to
753 DEBUG(dbgs() << "handleMove " << OldIdx << " -> " << NewIdx << ": " << *MI);
786 /// OldIdx to NewIdx.
798 if (SlotIndex::isEarlierInstr(OldIdx, NewIdx))
806 /// Update LR to reflect an instruction has been moved downwards from OldIdx
809 /// 1. Live def at OldIdx:
812 /// 2. Live def at OldIdx, killed at NewIdx:
816 /// 3. Dead def at OldIdx:
819 /// 4. Def at OldIdx AND at NewIdx:
820 /// Remove segment [OldIdx;NewIdx) and value defined at OldIdx.
823 /// 5. Value read at OldIdx, killed before NewIdx:
827 // First look for a kill at OldIdx.
828 LiveRange::iterator I = LR.find(OldIdx.getBaseIndex());
830 // Is LR even live at OldIdx?
831 if (I == E || SlotIndex::isEarlierInstr(OldIdx, I->start))
835 if (!SlotIndex::isSameInstr(I->start, OldIdx)) {
836 bool isKill = SlotIndex::isSameInstr(OldIdx, I->end);
856 // Check for a def at OldIdx.
857 if (I == E || !SlotIndex::isSameInstr(OldIdx, I->start))
859 // We have a def at OldIdx.
870 // 2. Live def at OldIdx, killed at NewIdx: isSameInstr(I->end, NewIdx).
871 // 3. Dead def at OldIdx: I->end = OldIdx.getDeadSlot().
873 assert((I->end == OldIdx.getDeadSlot() ||
878 // There is an existing def at NewIdx, case 4 above. The def at OldIdx is
885 // If the def at OldIdx was dead, we allow it to be moved across other LR
894 /// Update LR to reflect an instruction has been moved upwards from OldIdx
897 /// 1. Live def at OldIdx:
900 /// 2. Dead def at OldIdx:
903 /// 3. Dead def at OldIdx AND existing def at NewIdx:
904 /// Remove value defined at OldIdx, coalescing it with existing value.
906 /// 4. Live def at OldIdx AND existing def at NewIdx:
907 /// Remove value defined at NewIdx, hoist OldIdx def to NewIdx.
910 /// 5. Value killed at OldIdx:
912 /// OldIdx.
915 // First look for a kill at OldIdx.
916 LiveRange::iterator I = LR.find(OldIdx.getBaseIndex());
918 // Is LR even live at OldIdx?
919 if (I == E || SlotIndex::isEarlierInstr(OldIdx, I->start))
923 if (!SlotIndex::isSameInstr(I->start, OldIdx)) {
925 if (!SlotIndex::isSameInstr(OldIdx, I->end))
931 // If OldIdx also defines a value, there couldn't have been another use.
932 if (I == E || !SlotIndex::isSameInstr(I->start, OldIdx)) {
940 // Now deal with the def at OldIdx.
941 assert(I != E && SlotIndex::isSameInstr(I->start, OldIdx) && "No def?");
952 // Case 3: Remove the dead def at OldIdx.
956 // Case 4: Replace def at NewIdx with live def at OldIdx.
978 OldIdx);
979 assert(RI != LIS.RegMaskSlots.end() && *RI == OldIdx.getRegSlot() &&
980 "No RegMask at OldIdx.");
990 // Return the last use of reg between NewIdx and OldIdx.
1001 if (InstSlot > LastUse && InstSlot < OldIdx)
1008 // expensive. Scan upwards from OldIdx instead.
1009 assert(NewIdx < OldIdx && "Expected upwards move");
1013 // OldIdx may not correspond to an instruction any longer, so set MII to
1014 // point to the next instruction after OldIdx, or MBB->end().
1017 Indexes->getNextNonNullIndex(OldIdx)))