Lines Matching refs:Idx
315 bool SplitAnalysis::isOriginalEndpoint(SlotIndex Idx) const { in isOriginalEndpoint()
319 LiveInterval::const_iterator I = Orig.find(Idx); in isOriginalEndpoint()
322 if (I != Orig.end() && I->start <= Idx) in isOriginalEndpoint()
323 return I->start == Idx; in isOriginalEndpoint()
326 return I != Orig.begin() && (--I)->end == Idx; in isOriginalEndpoint()
386 SlotIndex Idx) { in defValue() argument
388 assert(Idx.isValid() && "Invalid SlotIndex"); in defValue()
389 assert(Edit->getParent().getVNInfoAt(Idx) == ParentVNI && "Bad Parent VNI"); in defValue()
393 VNInfo *VNI = LI->getNextValue(Idx, LIS.getVNInfoAllocator()); in defValue()
490 void SplitEditor::selectIntv(unsigned Idx) { in selectIntv() argument
491 assert(Idx != 0 && "Cannot select the complement interval"); in selectIntv()
492 assert(Idx < Edit->size() && "Can only select previously opened interval"); in selectIntv()
493 DEBUG(dbgs() << " selectIntv " << OpenIdx << " -> " << Idx << '\n'); in selectIntv()
494 OpenIdx = Idx; in selectIntv()
497 SlotIndex SplitEditor::enterIntvBefore(SlotIndex Idx) { in enterIntvBefore() argument
499 DEBUG(dbgs() << " enterIntvBefore " << Idx); in enterIntvBefore()
500 Idx = Idx.getBaseIndex(); in enterIntvBefore()
501 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx); in enterIntvBefore()
504 return Idx; in enterIntvBefore()
507 MachineInstr *MI = LIS.getInstructionFromIndex(Idx); in enterIntvBefore()
510 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(), MI); in enterIntvBefore()
514 SlotIndex SplitEditor::enterIntvAfter(SlotIndex Idx) { in enterIntvAfter() argument
516 DEBUG(dbgs() << " enterIntvAfter " << Idx); in enterIntvAfter()
517 Idx = Idx.getBoundaryIndex(); in enterIntvAfter()
518 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx); in enterIntvAfter()
521 return Idx; in enterIntvAfter()
524 MachineInstr *MI = LIS.getInstructionFromIndex(Idx); in enterIntvAfter()
527 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(), in enterIntvAfter()
562 SlotIndex SplitEditor::leaveIntvAfter(SlotIndex Idx) { in leaveIntvAfter() argument
564 DEBUG(dbgs() << " leaveIntvAfter " << Idx); in leaveIntvAfter()
567 SlotIndex Boundary = Idx.getBoundaryIndex(); in leaveIntvAfter()
581 if (SpillMode && !SlotIndex::isSameInstr(ParentVNI->def, Idx) && in leaveIntvAfter()
584 defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI); in leaveIntvAfter()
585 return Idx; in leaveIntvAfter()
593 SlotIndex SplitEditor::leaveIntvBefore(SlotIndex Idx) { in leaveIntvBefore() argument
595 DEBUG(dbgs() << " leaveIntvBefore " << Idx); in leaveIntvBefore()
598 Idx = Idx.getBaseIndex(); in leaveIntvBefore()
599 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx); in leaveIntvBefore()
602 return Idx.getNextSlot(); in leaveIntvBefore()
606 MachineInstr *MI = LIS.getInstructionFromIndex(Idx); in leaveIntvBefore()
608 VNInfo *VNI = defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI); in leaveIntvBefore()
1079 SlotIndex Idx = LIS.getInstructionIndex(*MI); in rewriteAssigned() local
1081 Idx = Idx.getRegSlot(MO.isEarlyClobber()); in rewriteAssigned()
1084 unsigned RegIdx = RegAssign.lookup(Idx); in rewriteAssigned()
1088 << Idx << ':' << RegIdx << '\t' << *MI); in rewriteAssigned()
1100 Idx = Idx.getPrevSlot(); in rewriteAssigned()
1101 if (!Edit->getParent().liveAt(Idx)) in rewriteAssigned()
1104 Idx = Idx.getRegSlot(true); in rewriteAssigned()
1106 getLRCalc(RegIdx).extend(*LI, Idx.getNextSlot()); in rewriteAssigned()
1296 SlotIndex Idx = leaveIntvAtTop(*MBB); in splitLiveThroughBlock() local
1297 assert((!LeaveBefore || Idx <= LeaveBefore) && "Interference"); in splitLiveThroughBlock()
1298 (void)Idx; in splitLiveThroughBlock()
1310 SlotIndex Idx = enterIntvAtEnd(*MBB); in splitLiveThroughBlock() local
1311 assert((!EnterAfter || Idx >= EnterAfter) && "Interference"); in splitLiveThroughBlock()
1312 (void)Idx; in splitLiveThroughBlock()
1340 SlotIndex Idx; in splitLiveThroughBlock() local
1342 Idx = enterIntvBefore(LeaveBefore); in splitLiveThroughBlock()
1343 useIntv(Idx, Stop); in splitLiveThroughBlock()
1345 Idx = enterIntvAtEnd(*MBB); in splitLiveThroughBlock()
1348 useIntv(Start, Idx); in splitLiveThroughBlock()
1349 assert((!LeaveBefore || Idx <= LeaveBefore) && "Interference"); in splitLiveThroughBlock()
1350 assert((!EnterAfter || Idx >= EnterAfter) && "Interference"); in splitLiveThroughBlock()
1363 SlotIndex Idx = enterIntvAfter(EnterAfter); in splitLiveThroughBlock() local
1364 useIntv(Idx, Stop); in splitLiveThroughBlock()
1365 assert((!EnterAfter || Idx >= EnterAfter) && "Interference"); in splitLiveThroughBlock()
1368 Idx = leaveIntvBefore(LeaveBefore); in splitLiveThroughBlock()
1369 useIntv(Start, Idx); in splitLiveThroughBlock()
1370 assert((!LeaveBefore || Idx <= LeaveBefore) && "Interference"); in splitLiveThroughBlock()
1416 SlotIndex Idx = leaveIntvAfter(BI.LastInstr); in splitRegInBlock() local
1417 useIntv(Start, Idx); in splitRegInBlock()
1418 assert((!LeaveBefore || Idx <= LeaveBefore) && "Interference"); in splitRegInBlock()
1422 SlotIndex Idx = leaveIntvBefore(LSP); in splitRegInBlock() local
1423 overlapIntv(Idx, BI.LastInstr); in splitRegInBlock()
1424 useIntv(Start, Idx); in splitRegInBlock()
1425 assert((!LeaveBefore || Idx <= LeaveBefore) && "Interference"); in splitRegInBlock()
1502 SlotIndex Idx = enterIntvBefore(std::min(LSP, BI.FirstInstr)); in splitRegOutBlock() local
1503 useIntv(Idx, Stop); in splitRegOutBlock()
1504 assert((!EnterAfter || Idx >= EnterAfter) && "Interference"); in splitRegOutBlock()
1518 SlotIndex Idx = enterIntvAfter(EnterAfter); in splitRegOutBlock() local
1519 useIntv(Idx, Stop); in splitRegOutBlock()
1520 assert((!EnterAfter || Idx >= EnterAfter) && "Interference"); in splitRegOutBlock()
1523 SlotIndex From = enterIntvBefore(std::min(Idx, BI.FirstInstr)); in splitRegOutBlock()
1524 useIntv(From, Idx); in splitRegOutBlock()