Home | History | Annotate | Download | only in src

Lines Matching refs:Item

32 // Returns true if Var has any definitions within Item's live range.
38 bool overlapsDefs(const Cfg *Func, const Variable *Item, const Variable *Var) {
42 if (Item->getLiveRange().overlapsInst(FirstDef->getNumber(), UseTrimmed))
45 if (Item->getLiveRange().overlapsInst(Def->getNumber(), UseTrimmed))
451 Variable *Item = Active[Index];
452 Item->trimLiveRange(Cur->getLiveRange().getStart());
454 if (Item->rangeEndsBefore(Cur)) {
455 // Move Item from Active to Handled list.
456 dumpLiveRangeTrace("Expiring ", Item);
459 } else if (!Item->rangeOverlapsStart(Cur)) {
460 // Move Item from Active to Inactive list.
461 dumpLiveRangeTrace("Inactivating ", Item);
466 // Decrement Item from RegUses[].
467 assert(Item->hasRegTmp());
468 const auto &Aliases = *RegAliases[Item->getRegNumTmp()];
480 Variable *Item = Inactive[Index];
481 Item->trimLiveRange(Cur->getLiveRange().getStart());
482 if (Item->rangeEndsBefore(Cur)) {
483 // Move Item from Inactive to Handled list.
484 dumpLiveRangeTrace("Expiring ", Item);
486 } else if (Item->rangeOverlapsStart(Cur)) {
487 // Move Item from Inactive to Active list.
488 dumpLiveRangeTrace("Reactivating ", Item);
490 // Increment Item in RegUses[].
491 assert(Item->hasRegTmp());
492 const auto &Aliases = *RegAliases[Item->getRegNumTmp()];
568 for (const Variable *Item : Inactive) {
569 if (!Item->rangeOverlaps(Iter.Cur))
571 const auto &Aliases = *RegAliases[Item->getRegNumTmp()];
580 if (Iter.AllowOverlap && Item != Iter.Prefer &&
581 RegAlias == Iter.PreferReg && overlapsDefs(Func, Iter.Cur, Item)) {
583 dumpDisableOverlap(Func, Item, "Inactive");
592 // Cur->rangeEndsBefore(Item) is an early exit check that turns a guaranteed
597 for (Variable *Item : reverse_range(UnhandledPrecolored)) {
598 assert(Item->hasReg());
599 if (Iter.Cur->rangeEndsBefore(Item))
601 if (!Item->rangeOverlaps(Iter.Cur))
604 *RegAliases[Item->getRegNum()]; // Note: not getRegNumTmp()
614 dumpDisableOverlap(Func, Item, "PrecoloredUnhandled");
665 for (const Variable *Item : Active) {
666 assert(Item->rangeOverlaps(Iter.Cur));
667 assert(Item->hasRegTmp());
668 const auto &Aliases = *RegAliases[Item->getRegNumTmp()];
669 // We add the Item's weight to each alias/subregister to represent that,
672 RegWeight W = Item->getWeight(Func);
678 for (const Variable *Item : Inactive) {
679 if (!Item->rangeOverlaps(Iter.Cur))
681 assert(Item->hasRegTmp());
682 const auto &Aliases = *RegAliases[Item->getRegNumTmp()];
683 RegWeight W = Item->getWeight(Func);
740 Variable *Item = Active[Index];
741 const auto RegNum = Item->getRegNumTmp();
743 dumpLiveRangeTrace("Evicting A ", Item);
749 Item->setRegNumTmp(RegNumT());
751 Evicted.push_back(Item);
757 Variable *Item = Inactive[Index];
758 // Note: The Item->rangeOverlaps(Cur) clause is not part of the description
765 if (Aliases[Item->getRegNumTmp()] && Item->rangeOverlaps(Iter.Cur)) {
766 dumpLiveRangeTrace("Evicting I ", Item);
767 Item->setRegNumTmp(RegNumT());
769 Evicted.push_back(Item);
801 for (Variable *Item : Handled) {
802 const auto RegNum = Item->getRegNumTmp();
805 if (Randomized && Item->hasRegTmp() && !Item->hasReg()) {
810 if (!Item->hasRegTmp()) {
812 Item->dump(Func);
815 Str << (AssignedRegNum == Item->getRegNum() ? "Reassigning "
817 << Target->getRegName(AssignedRegNum, Item->getType()) << "(r"
819 Item->dump(Func);
823 Item->setRegNum(AssignedRegNum);
915 for (const Variable *Item : Active) {
916 const RegNumT RegNum = Item->getRegNumTmp();
917 if (Item != Iter.Prefer && Aliases[RegNum] &&
918 overlapsDefs(Func, Iter.Cur, Item)) {
920 dumpDisableOverlap(Func, Item, "Active");
988 void LinearScan::dumpLiveRangeTrace(const char *Label, const Variable *Item) {
995 dumpLiveRange(Item, Func);
1009 for (const Variable *Item : Handled) {
1010 dumpLiveRange(Item, Func);
1014 for (const Variable *Item : reverse_range(Unhandled)) {
1015 dumpLiveRange(Item, Func);
1019 for (const Variable *Item : Active) {
1020 dumpLiveRange(Item, Func);
1024 for (const Variable *Item : Inactive) {
1025 dumpLiveRange(Item, Func);