Lines Matching refs:Cur
401 assert(!Iter.Cur->getLiveRange().isEmpty()); in addSpillFill()
402 InstNumberT Start = Iter.Cur->getLiveRange().getStart(); in addSpillFill()
403 InstNumberT End = Iter.Cur->getLiveRange().getEnd(); in addSpillFill()
404 CfgNode *Node = Func->getVMetadata()->getLocalUseNode(Iter.Cur); in addSpillFill()
435 Iter.Cur->setRegNumTmp(RegNum); in addSpillFill()
436 Variable *Preg = Target->getPhysicalRegister(RegNum, Iter.Cur->getType()); in addSpillFill()
439 Variable *SpillLoc = Func->makeVariable(Iter.Cur->getType()); in addSpillFill()
448 void LinearScan::handleActiveRangeExpiredOrInactive(const Variable *Cur) { in handleActiveRangeExpiredOrInactive() argument
452 Item->trimLiveRange(Cur->getLiveRange().getStart()); in handleActiveRangeExpiredOrInactive()
454 if (Item->rangeEndsBefore(Cur)) { in handleActiveRangeExpiredOrInactive()
459 } else if (!Item->rangeOverlapsStart(Cur)) { in handleActiveRangeExpiredOrInactive()
477 void LinearScan::handleInactiveRangeExpiredOrReactivated(const Variable *Cur) { in handleInactiveRangeExpiredOrReactivated() argument
481 Item->trimLiveRange(Cur->getLiveRange().getStart()); in handleInactiveRangeExpiredOrReactivated()
482 if (Item->rangeEndsBefore(Cur)) { in handleInactiveRangeExpiredOrReactivated()
486 } else if (Item->rangeOverlapsStart(Cur)) { in handleInactiveRangeExpiredOrReactivated()
519 const Inst *DefInst = VMetadata->getFirstDefinitionSingleBlock(Iter.Cur); in findRegisterPreference()
523 assert(DefInst->getDest() == Iter.Cur); in findRegisterPreference()
525 DefInst->isVarAssign() && !VMetadata->isMultiDef(Iter.Cur); in findRegisterPreference()
542 Iter.AllowOverlap = !overlapsDefs(Func, Iter.Cur, SrcVar); in findRegisterPreference()
569 if (!Item->rangeOverlaps(Iter.Cur)) in filterFreeWithInactiveRanges()
581 RegAlias == Iter.PreferReg && overlapsDefs(Func, Iter.Cur, Item)) { in filterFreeWithInactiveRanges()
599 if (Iter.Cur->rangeEndsBefore(Item)) in filterFreeWithPrecoloredRanges()
601 if (!Item->rangeOverlaps(Iter.Cur)) in filterFreeWithPrecoloredRanges()
620 void LinearScan::allocatePrecoloredRegister(Variable *Cur) { in allocatePrecoloredRegister() argument
621 const auto RegNum = Cur->getRegNum(); in allocatePrecoloredRegister()
623 assert(Cur->getRegNumTmp() == RegNum); in allocatePrecoloredRegister()
624 dumpLiveRangeTrace("Precoloring ", Cur); in allocatePrecoloredRegister()
625 Active.push_back(Cur); in allocatePrecoloredRegister()
632 assert(UnhandledPrecolored.back() == Cur); in allocatePrecoloredRegister()
637 Iter.Cur->setRegNumTmp(Iter.PreferReg); in allocatePreferredRegister()
638 dumpLiveRangeTrace("Preferring ", Iter.Cur); in allocatePreferredRegister()
644 Active.push_back(Iter.Cur); in allocatePreferredRegister()
650 Iter.Cur->setRegNumTmp(RegNum); in allocateFreeRegister()
652 dumpLiveRangeTrace("Allocating Y ", Iter.Cur); in allocateFreeRegister()
654 dumpLiveRangeTrace("Allocating X ", Iter.Cur); in allocateFreeRegister()
660 Active.push_back(Iter.Cur); in allocateFreeRegister()
666 assert(Item->rangeOverlaps(Iter.Cur)); in handleNoFreeRegisters()
679 if (!Item->rangeOverlaps(Iter.Cur)) in handleNoFreeRegisters()
693 Iter.Cur->getWeight(Func) <= Iter.Weights[MinWeightIndex]) { in handleNoFreeRegisters()
694 if (!Iter.Cur->mustHaveReg()) { in handleNoFreeRegisters()
697 Handled.push_back(Iter.Cur); in handleNoFreeRegisters()
704 Handled.push_back(Iter.Cur); in handleNoFreeRegisters()
722 if (Iter.Cur->getWeight(Func) <= Iter.Weights[MinWeightIndex]) { in handleNoFreeRegisters()
723 dumpLiveRangeTrace("Failing ", Iter.Cur); in handleNoFreeRegisters()
727 Iter.Cur->getName()); in handleNoFreeRegisters()
728 Handled.push_back(Iter.Cur); in handleNoFreeRegisters()
765 if (Aliases[Item->getRegNumTmp()] && Item->rangeOverlaps(Iter.Cur)) { in handleNoFreeRegisters()
773 Iter.Cur->setRegNumTmp(RegNumT::fromInt(MinWeightIndex)); in handleNoFreeRegisters()
778 Active.push_back(Iter.Cur); in handleNoFreeRegisters()
779 dumpLiveRangeTrace("Allocating Z ", Iter.Cur); in handleNoFreeRegisters()
849 Iter.Cur = Unhandled.back(); in scan()
851 dumpLiveRangeTrace("\nConsidering ", Iter.Cur); in scan()
853 assert(Target->getAllRegistersForVariable(Iter.Cur).any()); in scan()
855 assert(Target->getRegistersForVariable(Iter.Cur).any()); in scan()
856 Iter.RegMask = RegMaskFull & Target->getRegistersForVariable(Iter.Cur); in scan()
858 RegMaskFull & Target->getAllRegistersForVariable(Iter.Cur); in scan()
859 KillsRange.trim(Iter.Cur->getLiveRange().getStart()); in scan()
865 if (Iter.Cur->hasReg()) { in scan()
866 allocatePrecoloredRegister(Iter.Cur); in scan()
870 handleActiveRangeExpiredOrInactive(Iter.Cur); in scan()
871 handleInactiveRangeExpiredOrReactivated(Iter.Cur); in scan()
893 overlapsDefs(Func, Iter.Cur, Item)) { in scan()
911 if (Iter.Cur->getLiveRange().overlaps(KillsRange, UseTrimmed)) { in scan()
925 Str << Target->getRegName(i, Iter.Cur->getType()) << "(U=" << RegUses[i] in scan()