• Home
  • Raw
  • Download

Lines Matching refs:Reg

49 void RegisterPressure::increase(unsigned Reg, const TargetRegisterInfo *TRI,  in increase()  argument
51 if (TargetRegisterInfo::isVirtualRegister(Reg)) { in increase()
52 const TargetRegisterClass *RC = MRI->getRegClass(Reg); in increase()
59 TRI->getRegUnitPressureSets(Reg), in increase()
60 TRI->getRegUnitWeight(Reg)); in increase()
65 void RegisterPressure::decrease(unsigned Reg, const TargetRegisterInfo *TRI, in decrease() argument
67 if (TargetRegisterInfo::isVirtualRegister(Reg)) { in decrease()
68 const TargetRegisterClass *RC = MRI->getRegClass(Reg); in decrease()
73 decreaseSetPressure(MaxSetPressure, TRI->getRegUnitPressureSets(Reg), in decrease()
74 TRI->getRegUnitWeight(Reg)); in decrease()
190 const LiveInterval *RegPressureTracker::getInterval(unsigned Reg) const { in getInterval()
191 if (TargetRegisterInfo::isVirtualRegister(Reg)) in getInterval()
192 return &LIS->getInterval(Reg); in getInterval()
193 return LIS->getCachedRegUnit(Reg); in getInterval()
308 static bool containsReg(ArrayRef<unsigned> Regs, unsigned Reg) { in containsReg() argument
309 return std::find(Regs.begin(), Regs.end(), Reg) != Regs.end(); in containsReg()
341 void pushRegUnits(unsigned Reg, SmallVectorImpl<unsigned> &Regs) { in pushRegUnits() argument
342 if (TargetRegisterInfo::isVirtualRegister(Reg)) { in pushRegUnits()
343 if (containsReg(Regs, Reg)) in pushRegUnits()
345 Regs.push_back(Reg); in pushRegUnits()
347 else if (MRI->isAllocatable(Reg)) { in pushRegUnits()
348 for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) { in pushRegUnits()
379 void RegPressureTracker::discoverLiveIn(unsigned Reg) { in discoverLiveIn() argument
380 assert(!LiveRegs.contains(Reg) && "avoid bumping max pressure twice"); in discoverLiveIn()
381 if (containsReg(P.LiveInRegs, Reg)) in discoverLiveIn()
385 P.LiveInRegs.push_back(Reg); in discoverLiveIn()
386 P.increase(Reg, TRI, MRI); in discoverLiveIn()
390 void RegPressureTracker::discoverLiveOut(unsigned Reg) { in discoverLiveOut() argument
391 assert(!LiveRegs.contains(Reg) && "avoid bumping max pressure twice"); in discoverLiveOut()
392 if (containsReg(P.LiveOutRegs, Reg)) in discoverLiveOut()
396 P.LiveOutRegs.push_back(Reg); in discoverLiveOut()
397 P.increase(Reg, TRI, MRI); in discoverLiveOut()
441 unsigned Reg = RegOpers.Defs[i]; in recede() local
442 if (LiveRegs.erase(Reg)) in recede()
443 decreaseRegPressure(Reg); in recede()
445 discoverLiveOut(Reg); in recede()
450 unsigned Reg = RegOpers.Uses[i]; in recede() local
451 if (!LiveRegs.contains(Reg)) { in recede()
454 const LiveInterval *LI = getInterval(Reg); in recede()
456 discoverLiveOut(Reg); in recede()
458 increaseRegPressure(Reg); in recede()
459 LiveRegs.insert(Reg); in recede()
491 unsigned Reg = RegOpers.Uses[i]; in advance() local
493 bool isLive = LiveRegs.contains(Reg); in advance()
495 discoverLiveIn(Reg); in advance()
499 const LiveInterval *LI = getInterval(Reg); in advance()
504 lastUse = !TargetRegisterInfo::isVirtualRegister(Reg); in advance()
507 LiveRegs.erase(Reg); in advance()
508 decreaseRegPressure(Reg); in advance()
511 increaseRegPressure(Reg); in advance()
516 unsigned Reg = RegOpers.Defs[i]; in advance() local
517 if (LiveRegs.insert(Reg)) in advance()
518 increaseRegPressure(Reg); in advance()
627 unsigned Reg = RegOpers.Defs[i]; in bumpUpwardPressure() local
628 if (!containsReg(RegOpers.Uses, Reg)) in bumpUpwardPressure()
629 decreaseRegPressure(Reg); in bumpUpwardPressure()
633 unsigned Reg = RegOpers.Uses[i]; in bumpUpwardPressure() local
634 if (!LiveRegs.contains(Reg)) in bumpUpwardPressure()
635 increaseRegPressure(Reg); in bumpUpwardPressure()
674 static bool findUseBetween(unsigned Reg, in findUseBetween() argument
679 UI = MRI->use_nodbg_begin(Reg), UE = MRI->use_nodbg_end(); in findUseBetween()
711 unsigned Reg = RegOpers.Uses[i]; in bumpDownwardPressure() local
716 const LiveInterval *LI = getInterval(Reg); in bumpDownwardPressure()
718 && !findUseBetween(Reg, CurrIdx, SlotIdx, MRI, LIS)) { in bumpDownwardPressure()
719 decreaseRegPressure(Reg); in bumpDownwardPressure()
722 else if (!TargetRegisterInfo::isVirtualRegister(Reg)) { in bumpDownwardPressure()
724 decreaseRegPressure(Reg); in bumpDownwardPressure()