Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:LI

128     if (LiveInterval *LI = RegUnitIntervals[i])
129 OS << PrintRegUnit(i, TRI) << " = " << *LI << '\n';
165 void LiveIntervals::computeVirtRegInterval(LiveInterval *LI) {
167 assert(LI->empty() && "Should only compute empty intervals.");
169 LRCalc->createDeadDefs(LI);
170 LRCalc->extendToUses(LI);
178 LiveInterval *LI = createInterval(Reg);
179 VirtRegIntervals[Reg] = LI;
180 computeVirtRegInterval(LI);
220 void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) {
221 unsigned Unit = LI->reg;
234 LRCalc->createDeadDefs(LI, Root);
237 LRCalc->createDeadDefs(LI, *Supers);
241 // Now extend LI to reach all uses.
246 LRCalc->extendToUses(LI, Root);
250 LRCalc->extendToUses(LI, Reg);
306 bool LiveIntervals::shrinkToUses(LiveInterval *li,
308 DEBUG(dbgs() << "Shrink: " << *li << '\n');
309 assert(TargetRegisterInfo::isVirtualRegister(li->reg)
317 // Visit all instructions reading li->reg.
318 for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(li->reg);
320 if (UseMI->isDebugValue() || !UseMI->readsVirtualRegister(li->reg))
323 LiveRangeQuery LRQ(*li, Idx);
331 << *li << '\n');
343 LiveInterval NewLI(li->reg, 0);
344 for (LiveInterval::vni_iterator I = li->vni_begin(), E = li->vni_end();
377 if (VNInfo *PVNI = li->getVNInfoBefore(Stop))
393 assert(li->getVNInfoBefore(Stop) == VNI &&
401 for (LiveInterval::vni_iterator I = li->vni_begin(), E = li->vni_end();
420 MI->addRegisterDead(li->reg, TRI);
429 li->ranges.swap(NewLI.ranges);
430 DEBUG(dbgs() << "Shrunk: " << *li << '\n');
434 void LiveIntervals::extendToIndices(LiveInterval *LI,
439 LRCalc->extend(LI, Indices[i]);
442 void LiveIntervals::pruneValue(LiveInterval *LI, SlotIndex Kill,
444 LiveRangeQuery LRQ(*LI, Kill);
455 LI->removeRange(Kill, LRQ.endPoint());
461 LI->removeRange(Kill, MBBEnd);
479 LiveRangeQuery LRQ(*LI, MBBStart);
488 LI->removeRange(MBBStart, LRQ.endPoint());
495 LI->removeRange(MBBStart, MBBEnd);
514 LiveInterval *LI = &getInterval(Reg);
515 if (LI->empty())
526 RU.push_back(std::make_pair(RUInt, RUInt->find(LI->begin()->end)));
530 for (LiveInterval::iterator RI = LI->begin(), RE = LI->end(); RI != RE;
569 LiveIntervals::intervalIsInOneMBB(const LiveInterval &LI) const {
577 SlotIndex Start = LI.beginIndex();
581 SlotIndex Stop = LI.endIndex();
593 LiveIntervals::hasPHIKill(const LiveInterval &LI, const VNInfo *VNI) const {
594 for (LiveInterval::const_vni_iterator I = LI.vni_begin(), E = LI.vni_end();
605 if (VNI == LI.getVNInfoBefore(Indexes->getMBBEndIdx(*PI)))
648 bool LiveIntervals::checkRegMaskInterference(LiveInterval &LI,
650 if (LI.empty())
652 LiveInterval::iterator LiveI = LI.begin(), LiveE = LI.end();
657 if (MachineBasicBlock *MBB = intervalIsInOneMBB(LI)) {
665 // We are going to enumerate all the register mask slots contained in LI.
671 // No slots in range, LI begins after the last call.
680 // *SlotI overlaps LI. Collect mask bits.
692 // *SlotI is beyond the current LI segment.
693 LiveI = LI.advanceTo(LiveI, *SlotI);
761 if (LiveInterval *LI = getRegUnitLI(*Units))
762 updateRange(*LI);
771 void updateRange(LiveInterval &LI) {
772 if (!Updated.insert(&LI))
776 if (TargetRegisterInfo::isVirtualRegister(LI.reg))
777 dbgs() << PrintReg(LI.reg);
779 dbgs() << PrintRegUnit(LI.reg, &TRI);
780 dbgs() << ":\t" << LI << '\n';
783 handleMoveDown(LI);
785 handleMoveUp(LI);
786 DEBUG(dbgs() << " -->\t" << LI << '\n');
787 LI.verify();
790 /// Update LI to reflect an instruction has been moved downwards from OldIdx
810 void handleMoveDown(LiveInterval &LI) {
812 LiveInterval::iterator I = LI.find(OldIdx.getBaseIndex());
813 LiveInterval::iterator E = LI.end();
814 // Is LI even live at OldIdx?
831 // Adjust I->end to reach NewIdx. This may temporarily make LI invalid by
860 LiveInterval::iterator NewI = LI.advanceTo(I, NewIdx.getRegSlot());
865 LI.removeValNo(DefVNI);
869 // If the def at OldIdx was dead, we allow it to be moved across other LI
877 /// Update LI to reflect an instruction has been moved upwards from OldIdx
897 void handleMoveUp(LiveInterval &LI) {
899 LiveInterval::iterator I = LI.find(OldIdx.getBaseIndex());
900 LiveInterval::iterator E = LI.end();
901 // Is LI even live at OldIdx?
918 llvm::prior(I)->end = findLastUseBefore(LI.reg).getRegSlot();
930 LiveInterval::iterator NewI = LI.find(NewIdx.getRegSlot());
936 LI.removeValNo(DefVNI);
941 LI.removeValNo(NewI->valno);
952 // DefVNI is a dead def. It may have been moved across other values in LI,
1078 LiveInterval &LI = getOrCreateInterval(MOI->getReg());
1079 computeVirtRegInterval(&LI);
1089 LiveInterval &LI = getInterval(Reg);
1091 if (!LI.hasAtLeastOneValue())
1094 LiveInterval::iterator LII = LI.find(endIdx);
1096 if (LII != LI.end() && LII->start < endIdx)
1123 if (LII != LI.begin())
1128 LI.removeRange(*LII, true);
1130 LII = LI.find(prevStart);
1132 LII = LI.begin();
1145 VNInfo *VNI = LI.getNextValue(instrIdx.getRegSlot(),
1148 LII = LI.addRange(LR);
1150 VNInfo *VNI = LI.getNextValue(instrIdx.getRegSlot(),
1153 LII = LI.addRange(LR);