Lines Matching defs:ParentVNI

471                               const VNInfo *ParentVNI,
474 assert(ParentVNI && "Mapping NULL value");
476 assert(Edit->getParent().getVNInfoAt(Idx) == ParentVNI && "Bad Parent VNI");
486 Values.insert(std::make_pair(std::make_pair(RegIdx, ParentVNI->id), FP));
488 // This was the first time (RegIdx, ParentVNI) was mapped, and it is not
507 void SplitEditor::forceRecompute(unsigned RegIdx, const VNInfo &ParentVNI) {
508 ValueForcePair &VFP = Values[std::make_pair(RegIdx, ParentVNI.id)];
511 // ParentVNI was either unmapped or already complex mapped. Either way, just
591 VNInfo *SplitEditor::defFromParent(unsigned RegIdx, const VNInfo *ParentVNI,
609 LiveRangeEdit::Remat RM(ParentVNI);
641 return defValue(RegIdx, ParentVNI, Def, false);
667 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
668 if (!ParentVNI) {
672 LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
676 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(), MI);
684 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
685 if (!ParentVNI) {
689 LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
693 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Idx, *MI->getParent(),
704 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Last);
705 if (!ParentVNI) {
711 // It could be that the use after LSP is a def, and thus the ParentVNI
718 ParentVNI = Edit->getParent().getVNInfoAt(Last);
719 if (!ParentVNI) {
726 LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id);
727 VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Last, MBB,
752 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Boundary);
753 if (!ParentVNI) {
757 LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
765 if (SpillMode && !SlotIndex::isSameInstr(ParentVNI->def, Idx) &&
767 forceRecompute(0, *ParentVNI);
768 defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI);
772 VNInfo *VNI = defFromParent(0, ParentVNI, Boundary, *MI->getParent(),
783 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Idx);
784 if (!ParentVNI) {
788 LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
792 VNInfo *VNI = defFromParent(0, ParentVNI, Idx, *MI->getParent(), MI);
802 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start);
803 if (!ParentVNI) {
810 VNInfo *VNI = defFromParent(RegIdx, ParentVNI, Start, MBB,
825 const VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start);
826 assert(ParentVNI == Edit->getParent().getVNInfoBefore(End) &&
832 if (ParentVNI)
833 forceRecompute(0, *ParentVNI);
966 // Aggregate VNIs having the same value as ParentVNI.
970 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
971 EqualVNs[ParentVNI->id].insert(VNI);
974 // For VNI aggregation of each ParentVNI, collect dominated, i.e.,
977 const VNInfo *ParentVNI = Parent->getValNumInfo(i);
978 if (!NotToHoistSet.count(ParentVNI->id))
980 SmallPtrSetIterator<VNInfo *> It1 = EqualVNs[ParentVNI->id].begin();
982 for (; It1 != EqualVNs[ParentVNI->id].end(); ++It1) {
984 for (++It2; It2 != EqualVNs[ParentVNI->id].end(); ++It2) {
1000 forceRecompute(0, *ParentVNI);
1008 /// the same ParentVNI and hoist the backcopies to the dominator BB.
1011 /// ParentVNI.
1017 // Track the nearest common dominator for all back-copies for each ParentVNI,
1018 // indexed by ParentVNI->id.
1021 // The total cost of all the back-copies for each ParentVNI.
1023 // The ParentVNI->id set for which hoisting back-copies are not beneficial
1032 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
1033 assert(ParentVNI && "Parent not live at complement def");
1037 if (Edit->didRematerialize(ParentVNI))
1042 DomPair &Dom = NearestDom[ParentVNI->id];
1045 // instruction in the complement range. All other copies of ParentVNI
1047 if (VNI->def == ParentVNI->def) {
1054 if (Values.lookup(std::make_pair(0, ParentVNI->id)).getPointer()) {
1060 // First time we see ParentVNI. VNI dominates itself.
1076 Costs[ParentVNI->id] += MBFI.getBlockFreq(ValMBB);
1080 << VNI->def << " for parent " << ParentVNI->id << '@'
1081 << ParentVNI->def << " hoist to "
1092 const VNInfo *ParentVNI = Parent->getValNumInfo(i);
1093 MachineBasicBlock *DefMBB = LIS.getMBBFromIndex(ParentVNI->def);
1097 MBFI.getBlockFreq(Dom.first) > Costs[ParentVNI->id]) {
1098 NotToHoistSet.insert(ParentVNI->id);
1102 if (LSP <= ParentVNI->def) {
1103 NotToHoistSet.insert(ParentVNI->id);
1106 Dom.second = defFromParent(0, ParentVNI, LSP, *Dom.first,
1116 VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(VNI->def);
1117 const DomPair &Dom = NearestDom[ParentVNI->id];
1119 NotToHoistSet.count(ParentVNI->id))
1122 forceRecompute(0, *ParentVNI);
1140 VNInfo *ParentVNI = S.valno;
1160 // The interval [Start;End) is continuously mapped to RegIdx, ParentVNI.
1166 ValueForcePair VFP = Values.lookup(std::make_pair(RegIdx, ParentVNI->id));
1210 if (BlockStart == ParentVNI->def) {
1212 assert(ParentVNI->isPHIDef() && "Non-phi defined at block start?");
1467 void SplitEditor::forceRecomputeVNI(const VNInfo &ParentVNI) {
1469 if (!ParentVNI.isPHIDef()) {
1471 forceRecompute(I, ParentVNI);
1478 Visited.insert(&ParentVNI);
1479 WorkList.push_back(&ParentVNI);
1509 for (const VNInfo *ParentVNI : Edit->getParent().valnos) {
1510 if (ParentVNI->isUnused())
1512 unsigned RegIdx = RegAssign.lookup(ParentVNI->def);
1513 defValue(RegIdx, ParentVNI, ParentVNI->def, true);
1517 if (Edit->didRematerialize(ParentVNI))
1518 forceRecomputeVNI(*ParentVNI);