Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:OldIdx

712   SlotIndex OldIdx;
720 SlotIndex OldIdx, SlotIndex NewIdx, bool UpdateFlags)
721 : LIS(LIS), MRI(MRI), TRI(TRI), OldIdx(OldIdx), NewIdx(NewIdx),
734 /// Update all live ranges touched by MI, assuming a move from OldIdx to
737 DEBUG(dbgs() << "handleMove " << OldIdx << " -> " << NewIdx << ": " << *MI);
769 /// OldIdx to NewIdx.
781 if (SlotIndex::isEarlierInstr(OldIdx, NewIdx))
789 /// Update LI to reflect an instruction has been moved downwards from OldIdx
792 /// 1. Live def at OldIdx:
795 /// 2. Live def at OldIdx, killed at NewIdx:
799 /// 3. Dead def at OldIdx:
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:
810 // First look for a kill at OldIdx.
811 LiveInterval::iterator I = LI.find(OldIdx.getBaseIndex());
813 // Is LI even live at OldIdx?
814 if (I == E || SlotIndex::isEarlierInstr(OldIdx, I->start))
818 if (!SlotIndex::isSameInstr(I->start, OldIdx)) {
819 bool isKill = SlotIndex::isSameInstr(OldIdx, I->end);
839 // Check for a def at OldIdx.
840 if (I == E || !SlotIndex::isSameInstr(OldIdx, I->start))
842 // We have a def at OldIdx.
853 // 2. Live def at OldIdx, killed at NewIdx: isSameInstr(I->end, NewIdx).
854 // 3. Dead def at OldIdx: I->end = OldIdx.getDeadSlot().
856 assert((I->end == OldIdx.getDeadSlot() ||
861 // There is an existing def at NewIdx, case 4 above. The def at OldIdx is
868 // If the def at OldIdx was dead, we allow it to be moved across other LI
876 /// Update LI to reflect an instruction has been moved upwards from OldIdx
879 /// 1. Live def at OldIdx:
882 /// 2. Dead def at OldIdx:
885 /// 3. Dead def at OldIdx AND existing def at NewIdx:
886 /// Remove value defined at OldIdx, coalescing it with existing value.
888 /// 4. Live def at OldIdx AND existing def at NewIdx:
889 /// Remove value defined at NewIdx, hoist OldIdx def to NewIdx.
892 /// 5. Value killed at OldIdx:
894 /// OldIdx.
897 // First look for a kill at OldIdx.
898 LiveInterval::iterator I = LI.find(OldIdx.getBaseIndex());
900 OldIdx?
901 if (I == E || SlotIndex::isEarlierInstr(OldIdx, I->start))
905 if (!SlotIndex::isSameInstr(I->start, OldIdx)) {
907 if (!SlotIndex::isSameInstr(OldIdx, I->end))
913 // If OldIdx also defines a value, there couldn't have been another use.
914 if (I == E || !SlotIndex::isSameInstr(I->start, OldIdx)) {
922 // Now deal with the def at OldIdx.
923 assert(I != E && SlotIndex::isSameInstr(I->start, OldIdx) && "No def?");
934 // Case 3: Remove the dead def at OldIdx.
938 // Case 4: Replace def at NewIdx with live def at OldIdx.
960 OldIdx);
961 assert(RI != LIS.RegMaskSlots.end() && *RI == OldIdx.getRegSlot() &&
962 "No RegMask at OldIdx.");
972 // Return the last use of reg between NewIdx and OldIdx.
983 if (InstSlot > LastUse && InstSlot < OldIdx)
990 // expensive. Scan upwards from OldIdx instead.
991 assert(NewIdx < OldIdx && "Expected upwards move");
995 // OldIdx may not correspond to an instruction any longer, so set MII to
996 // point to the next instruction after OldIdx, or MBB->end().
999 Indexes->getNextNonNullIndex(OldIdx)))