Lines Matching refs:cur
254 LiveInterval *hasNextReloadInterval(LiveInterval *cur);
264 void assignRegOrStackSlotAtInterval(LiveInterval* cur);
274 void findIntervalsToSpill(LiveInterval *cur,
286 unsigned attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg);
353 unsigned getFreePhysReg(LiveInterval* cur);
354 unsigned getFreePhysReg(LiveInterval* cur,
448 unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) {
449 unsigned Preference = vrm_->getRegAllocPref(cur.reg);
450 if ((Preference && Preference == Reg) || !cur.containsOneValue())
454 if (cur.ranges.size() != 1)
457 const LiveRange &range = cur.ranges.front();
471 CopyMI->isCopy() && cur.reg == CopyMI->getOperand(1).getReg())
490 const TargetRegisterClass *RC = mri_->getRegClass(cur.reg);
494 if (li_->conflictsWithPhysReg(cur, *vrm_, CandReg))
498 DEBUG(dbgs() << "Coalescing: " << cur << " -> " << tri_->getName(CandReg)
500 vrm_->clearVirt(cur.reg);
501 vrm_->assignVirt2Phys(cur.reg, CandReg);
599 LiveInterval* cur = unhandled_.top();
602 DEBUG(dbgs() << "\n*** CURRENT ***: " << *cur << '\n');
604 assert(!cur->empty() && "Empty interval in unhandled set.");
606 processActiveIntervals(cur->beginIndex());
607 processInactiveIntervals(cur->beginIndex());
609 assert(TargetRegisterInfo::isVirtualRegister(cur->reg) &&
615 assignRegOrStackSlotAtInterval(cur);
647 LiveInterval &cur = *i->second;
649 bool isPhys = TargetRegisterInfo::isPhysicalRegister(cur.reg);
651 Reg = cur.reg;
652 else if (vrm_->isAssignedReg(cur.reg))
653 Reg = attemptTrivialCoalescing(cur, vrm_->getPhys(cur.reg));
657 if (!isPhys && vrm_->getPreSplitReg(cur.reg))
660 for (LiveInterval::Ranges::const_iterator I = cur.begin(), E = cur.end();
823 /// getConflictWeight - Return the number of conflicts between cur
826 float getConflictWeight(LiveInterval *cur, unsigned Reg, LiveIntervals *li_,
833 if (cur->liveAt(li_->getInstructionIndex(MI))) {
845 void RALinScan::findIntervalsToSpill(LiveInterval *cur,
851 // the one that has fewest defs and uses that conflict with cur.
866 if (!cur->overlapsFrom(*i->first, i->second))
872 Conflicts[j] += getConflictWeight(cur, Reg, li_, mri_, loopInfo);
881 if (!cur->overlapsFrom(*i->first, i->second-1))
887 Conflicts[j] += getConflictWeight(cur, Reg, li_, mri_, loopInfo);
932 LiveInterval *RALinScan::hasNextReloadInterval(LiveInterval *cur) {
933 DenseMap<unsigned, unsigned>::iterator I = NextReloadMap.find(cur->reg);
967 void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur) {
968 const TargetRegisterClass *RC = mri_->getRegClass(cur->reg);
973 if (cur->empty()) {
974 unsigned physReg = vrm_->getRegAllocPref(cur->reg);
979 vrm_->assignVirt2Phys(cur->reg, physReg);
986 SlotIndex StartPosition = cur->beginIndex();
994 if (!vrm_->getRegAllocPref(cur->reg) && cur->hasAtLeastOneValue()) {
995 VNInfo *vni = cur->begin()->valno;
1013 mri_->setRegAllocationHint(cur->reg, 0, Reg);
1030 cur->overlapsFrom(*i->first, i->second-1)) {
1042 unsigned physReg = getFreePhysReg(cur);
1064 if (cur->overlapsFrom(*I, II)) {
1089 if (cur->overlapsFrom(*I, II)) {
1099 physReg = getFreePhysReg(cur);
1113 vrm_->assignVirt2Phys(cur->reg, physReg);
1115 active_.push_back(std::make_pair(cur, cur->begin()));
1116 handled_.push_back(cur);
1121 tri_->avoidWriteAfterWrite(mri_->getRegClass(cur->reg)))
1126 if (LiveInterval *NextReloadLI = hasNextReloadInterval(cur)) {
1130 DowngradeRegister(cur, physReg);
1152 DEBUG(dbgs() << "\tassigning stack slot at interval "<< *cur << ":\n");
1189 if (cur->weight == HUGE_VALF ||
1190 li_->getApproximateInstructionCount(*cur) == 0) {
1192 if (li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_)) {
1203 assignRegOrStackSlotAtInterval(cur);
1231 if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
1232 DEBUG(dbgs() << "\t\t\tspilling(c): " << *cur << '\n');
1234 LiveRangeEdit LRE(*cur, added);
1278 unhandled_.push(cur);
1289 findIntervalsToSpill(cur, RegsWeights, LastCandidate, spillIs);
1382 HI->expiredAt(cur->beginIndex())) {
1420 unsigned RALinScan::getFreePhysReg(LiveInterval* cur,
1428 std::pair<unsigned, unsigned> Hint = mri_->getRegAllocationHint(cur->reg);
1500 unsigned RALinScan::getFreePhysReg(LiveInterval *cur) {
1504 const TargetRegisterClass *RC = mri_->getRegClass(cur->reg);
1527 unsigned Preference = vrm_->getRegAllocPref(cur->reg);
1535 unsigned FreeReg = getFreePhysReg(cur, RC, MaxInactiveCount, inactiveCounts,
1539 return getFreePhysReg(cur, RC, MaxInactiveCount, inactiveCounts, false);