Lines Matching refs:ParentVNI
385 const VNInfo *ParentVNI,
387 assert(ParentVNI && "Mapping NULL value");
389 assert(Edit->getParent().getVNInfoAt(Idx) == ParentVNI && "Bad Parent VNI");
397 Values.insert(std::make_pair(std::make_pair(RegIdx, ParentVNI->id),
400 // This was the first time (RegIdx, ParentVNI) was mapped.
420 void SplitEditor::forceRecompute(unsigned RegIdx, const VNInfo *ParentVNI) {
421 assert(ParentVNI && "Mapping NULL value");
422 ValueForcePair &VFP = Values[std::make_pair(RegIdx, ParentVNI->id)];
425 // ParentVNI was either unmapped or already complex mapped. Either way, just
442 VNInfo *ParentVNI,
458 LiveRangeEdit::Remat RM(ParentVNI);
475 return defValue(RegIdx, ParentVNI, Def);
501 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
502 if (!ParentVNI) {
506 DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
510 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(), MI);
518 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
519 if (!ParentVNI) {
523 DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
527 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(),
537 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Last);
538 if (!ParentVNI) {
542 DEBUG(dbgs() << ": valno " << ParentVNI->id);
543 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Last, MBB,
568 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Boundary);
569 if (!ParentVNI) {
573 DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
581 if (SpillMode && !SlotIndex::isSameInstr(ParentVNI->def, Idx) &&
583 forceRecompute(0, ParentVNI);
584 defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI);
588 VNInfo *VNI = defFromParent(0, ParentVNI, Boundary, *MI->getParent(),
599 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
600 if (!ParentVNI) {
604 DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
608 VNInfo *VNI = defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI);
617 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start);
618 if (!ParentVNI) {
623 VNInfo *VNI = defFromParent(0, ParentVNI, Start, MBB,
632 const VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start);
633 assert(ParentVNI == Edit->getParent().getVNInfoBefore(End) &&
639 if (ParentVNI)
640 forceRecompute(0, ParentVNI);
753 // Aggregate VNIs having the same value as ParentVNI.
757 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
758 EqualVNs[ParentVNI->id].insert(VNI);
761 // For VNI aggregation of each ParentVNI, collect dominated, i.e.,
764 VNInfo *ParentVNI = Parent->getValNumInfo(i);
765 if (!NotToHoistSet.count(ParentVNI->id))
767 SmallPtrSetIterator<VNInfo *> It1 = EqualVNs[ParentVNI->id].begin();
769 for (; It1 != EqualVNs[ParentVNI->id].end(); ++It1) {
771 for (++It2; It2 != EqualVNs[ParentVNI->id].end(); ++It2) {
787 forceRecompute(0, ParentVNI);
797 /// the same ParentVNI and hoist the backcopies to the dominator BB.
800 /// ParentVNI.
806 // Track the nearest common dominator for all back-copies for each ParentVNI,
807 // indexed by ParentVNI->id.
810 // The total cost of all the back-copies for each ParentVNI.
812 // The ParentVNI->id set for which hoisting back-copies are not beneficial
821 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
822 assert(ParentVNI && "Parent not live at complement def");
826 if (Edit->didRematerialize(ParentVNI))
831 DomPair &Dom = NearestDom[ParentVNI->id];
834 // instruction in the complement range. All other copies of ParentVNI
836 if (VNI->def == ParentVNI->def) {
843 if (Values.lookup(std::make_pair(0, ParentVNI->id)).getPointer()) {
849 // First time we see ParentVNI. VNI dominates itself.
865 Costs[ParentVNI->id] += MBFI.getBlockFreq(ValMBB);
869 << " for parent " << ParentVNI->id << '@' << ParentVNI->def
880 VNInfo *ParentVNI = Parent->getValNumInfo(i);
881 MachineBasicBlock *DefMBB = LIS.getMBBFromIndex(ParentVNI->def);
885 MBFI.getBlockFreq(Dom.first) > Costs[ParentVNI->id]) {
886 NotToHoistSet.insert(ParentVNI->id);
891 defFromParent(0, ParentVNI, Last, *Dom.first,
901 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
902 const DomPair &Dom = NearestDom[ParentVNI->id];
904 NotToHoistSet.count(ParentVNI->id))
907 forceRecompute(0, ParentVNI);
926 VNInfo *ParentVNI = S.valno;
946 // The interval [Start;End) is continuously mapped to RegIdx, ParentVNI.
951 ValueForcePair VFP = Values.lookup(std::make_pair(RegIdx, ParentVNI->id));
995 if (BlockStart == ParentVNI->def) {
997 assert(ParentVNI->isPHIDef() && "Non-phi defined at block start?");
1145 for (const VNInfo *ParentVNI : Edit->getParent().valnos) {
1146 if (ParentVNI->isUnused())
1148 unsigned RegIdx = RegAssign.lookup(ParentVNI->def);
1149 defValue(RegIdx, ParentVNI, ParentVNI->def);
1153 if (Edit->didRematerialize(ParentVNI))
1155 forceRecompute(i, ParentVNI);