Lines Matching refs:Item
38 bool overlapsDefs(const Cfg *Func, const Variable *Item, const Variable *Var) { in overlapsDefs() argument
42 if (Item->getLiveRange().overlapsInst(FirstDef->getNumber(), UseTrimmed)) in overlapsDefs()
45 if (Item->getLiveRange().overlapsInst(Def->getNumber(), UseTrimmed)) in overlapsDefs()
451 Variable *Item = Active[Index]; in handleActiveRangeExpiredOrInactive() local
452 Item->trimLiveRange(Cur->getLiveRange().getStart()); in handleActiveRangeExpiredOrInactive()
454 if (Item->rangeEndsBefore(Cur)) { in handleActiveRangeExpiredOrInactive()
456 dumpLiveRangeTrace("Expiring ", Item); in handleActiveRangeExpiredOrInactive()
459 } else if (!Item->rangeOverlapsStart(Cur)) { in handleActiveRangeExpiredOrInactive()
461 dumpLiveRangeTrace("Inactivating ", Item); in handleActiveRangeExpiredOrInactive()
467 assert(Item->hasRegTmp()); in handleActiveRangeExpiredOrInactive()
468 const auto &Aliases = *RegAliases[Item->getRegNumTmp()]; in handleActiveRangeExpiredOrInactive()
480 Variable *Item = Inactive[Index]; in handleInactiveRangeExpiredOrReactivated() local
481 Item->trimLiveRange(Cur->getLiveRange().getStart()); in handleInactiveRangeExpiredOrReactivated()
482 if (Item->rangeEndsBefore(Cur)) { in handleInactiveRangeExpiredOrReactivated()
484 dumpLiveRangeTrace("Expiring ", Item); in handleInactiveRangeExpiredOrReactivated()
486 } else if (Item->rangeOverlapsStart(Cur)) { in handleInactiveRangeExpiredOrReactivated()
488 dumpLiveRangeTrace("Reactivating ", Item); in handleInactiveRangeExpiredOrReactivated()
491 assert(Item->hasRegTmp()); in handleInactiveRangeExpiredOrReactivated()
492 const auto &Aliases = *RegAliases[Item->getRegNumTmp()]; in handleInactiveRangeExpiredOrReactivated()
568 for (const Variable *Item : Inactive) { in filterFreeWithInactiveRanges() local
569 if (!Item->rangeOverlaps(Iter.Cur)) in filterFreeWithInactiveRanges()
571 const auto &Aliases = *RegAliases[Item->getRegNumTmp()]; in filterFreeWithInactiveRanges()
580 if (Iter.AllowOverlap && Item != Iter.Prefer && in filterFreeWithInactiveRanges()
581 RegAlias == Iter.PreferReg && overlapsDefs(Func, Iter.Cur, Item)) { in filterFreeWithInactiveRanges()
583 dumpDisableOverlap(Func, Item, "Inactive"); in filterFreeWithInactiveRanges()
597 for (Variable *Item : reverse_range(UnhandledPrecolored)) { in filterFreeWithPrecoloredRanges()
598 assert(Item->hasReg()); in filterFreeWithPrecoloredRanges()
599 if (Iter.Cur->rangeEndsBefore(Item)) in filterFreeWithPrecoloredRanges()
601 if (!Item->rangeOverlaps(Iter.Cur)) in filterFreeWithPrecoloredRanges()
604 *RegAliases[Item->getRegNum()]; // Note: not getRegNumTmp() in filterFreeWithPrecoloredRanges()
614 dumpDisableOverlap(Func, Item, "PrecoloredUnhandled"); in filterFreeWithPrecoloredRanges()
665 for (const Variable *Item : Active) { in handleNoFreeRegisters() local
666 assert(Item->rangeOverlaps(Iter.Cur)); in handleNoFreeRegisters()
667 assert(Item->hasRegTmp()); in handleNoFreeRegisters()
668 const auto &Aliases = *RegAliases[Item->getRegNumTmp()]; in handleNoFreeRegisters()
672 RegWeight W = Item->getWeight(Func); in handleNoFreeRegisters()
678 for (const Variable *Item : Inactive) { in handleNoFreeRegisters() local
679 if (!Item->rangeOverlaps(Iter.Cur)) in handleNoFreeRegisters()
681 assert(Item->hasRegTmp()); in handleNoFreeRegisters()
682 const auto &Aliases = *RegAliases[Item->getRegNumTmp()]; in handleNoFreeRegisters()
683 RegWeight W = Item->getWeight(Func); in handleNoFreeRegisters()
740 Variable *Item = Active[Index]; in handleNoFreeRegisters() local
741 const auto RegNum = Item->getRegNumTmp(); in handleNoFreeRegisters()
743 dumpLiveRangeTrace("Evicting A ", Item); in handleNoFreeRegisters()
749 Item->setRegNumTmp(RegNumT()); in handleNoFreeRegisters()
751 Evicted.push_back(Item); in handleNoFreeRegisters()
757 Variable *Item = Inactive[Index]; in handleNoFreeRegisters() local
765 if (Aliases[Item->getRegNumTmp()] && Item->rangeOverlaps(Iter.Cur)) { in handleNoFreeRegisters()
766 dumpLiveRangeTrace("Evicting I ", Item); in handleNoFreeRegisters()
767 Item->setRegNumTmp(RegNumT()); in handleNoFreeRegisters()
769 Evicted.push_back(Item); in handleNoFreeRegisters()
801 for (Variable *Item : Handled) { in assignFinalRegisters()
802 const auto RegNum = Item->getRegNumTmp(); in assignFinalRegisters()
805 if (Randomized && Item->hasRegTmp() && !Item->hasReg()) { in assignFinalRegisters()
810 if (!Item->hasRegTmp()) { in assignFinalRegisters()
812 Item->dump(Func); in assignFinalRegisters()
815 Str << (AssignedRegNum == Item->getRegNum() ? "Reassigning " in assignFinalRegisters()
817 << Target->getRegName(AssignedRegNum, Item->getType()) << "(r" in assignFinalRegisters()
819 Item->dump(Func); in assignFinalRegisters()
823 Item->setRegNum(AssignedRegNum); in assignFinalRegisters()
915 for (const Variable *Item : Active) { in scan() local
916 const RegNumT RegNum = Item->getRegNumTmp(); in scan()
917 if (Item != Iter.Prefer && Aliases[RegNum] && in scan()
918 overlapsDefs(Func, Iter.Cur, Item)) { in scan()
920 dumpDisableOverlap(Func, Item, "Active"); in scan()
988 void LinearScan::dumpLiveRangeTrace(const char *Label, const Variable *Item) { in dumpLiveRangeTrace() argument
995 dumpLiveRange(Item, Func); in dumpLiveRangeTrace()
1009 for (const Variable *Item : Handled) { in dump() local
1010 dumpLiveRange(Item, Func); in dump()
1014 for (const Variable *Item : reverse_range(Unhandled)) { in dump() local
1015 dumpLiveRange(Item, Func); in dump()
1019 for (const Variable *Item : Active) { in dump() local
1020 dumpLiveRange(Item, Func); in dump()
1024 for (const Variable *Item : Inactive) { in dump() local
1025 dumpLiveRange(Item, Func); in dump()