Lines Matching refs:PredBB
87 MachineBasicBlock *PredBB,
94 MachineBasicBlock *PredBB,
158 MachineBasicBlock *PredBB = *PI;
162 if (PHIBB == PredBB) {
170 << PredBB->getNumber() << '\n';
382 /// ProcessPHI - Process PHI node in TailBB by turning it into a copy in PredBB.
383 /// Remember the source register that's contributed by PredBB and update SSA
387 MachineBasicBlock *PredBB,
393 unsigned SrcOpIdx = getPHISrcRegOpIdx(MI, PredBB);
404 AddSSAUpdateEntry(DefReg, NewDef, PredBB);
409 // Remove PredBB from the PHI node.
416 /// DuplicateInstruction - Duplicate a TailBB instruction to PredBB and update
420 MachineBasicBlock *PredBB,
438 AddSSAUpdateEntry(Reg, NewReg, PredBB);
447 PredBB->insert(PredBB->instr_end(), NewMI);
647 MachineBasicBlock *PredBB = *PI;
649 if (PredBB->succ_size() > 1)
654 if (TII->AnalyzeBranch(*PredBB, PredTBB, PredFBB, PredCond, true))
675 MachineBasicBlock *PredBB = *PI;
677 if (PredBB->getLandingPadSuccessor())
680 if (bothUsedInPHI(*PredBB, Succs))
685 if (TII->AnalyzeBranch(*PredBB, PredTBB, PredFBB, PredCond, true))
689 DEBUG(dbgs() << "\nTail-duplicating into PredBB: " << *PredBB
693 MachineBasicBlock *NextBB = llvm::next(MachineFunction::iterator(PredBB));
723 TII->RemoveBranch(*PredBB);
726 TII->InsertBranch(*PredBB, PredTBB, PredFBB, PredCond, DebugLoc());
728 PredBB->removeSuccessor(TailBB);
729 unsigned NumSuccessors = PredBB->succ_size();
731 if (NumSuccessors == 0 || *PredBB->succ_begin() != NewTarget)
732 PredBB->addSuccessor(NewTarget);
734 TDBBs.push_back(PredBB);
763 MachineBasicBlock *PredBB = *PI;
765 assert(TailBB != PredBB &&
768 if (PredBB->succ_size() > 1)
773 if (TII->AnalyzeBranch(*PredBB, PredTBB, PredFBB, PredCond, true))
778 if (PredBB->isLayoutSuccessor(TailBB) && PredBB->canFallThrough())
781 DEBUG(dbgs() << "\nTail-duplicating into PredBB: " << *PredBB
784 TDBBs.push_back(PredBB);
786 // Remove PredBB's unconditional branch.
787 TII->RemoveBranch(*PredBB);
790 // Update PredBB livein.
791 RS->enterBasicBlock(PredBB);
792 if (!PredBB->empty())
793 RS->forward(prior(PredBB->end()));
802 PredBB->addLiveIn(*I);
806 // Clone the contents of TailBB into PredBB.
817 // from PredBB.
818 ProcessPHI(MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi, true);
822 DuplicateInstruction(MI, TailBB, PredBB, MF, LocalVRMap, UsedByPhi);
825 MachineBasicBlock::iterator Loc = PredBB->getFirstTerminator();
827 Copies.push_back(BuildMI(*PredBB, Loc, DebugLoc(),
833 TII->AnalyzeBranch(*PredBB, PredTBB, PredFBB, PredCond, true);
838 PredBB->removeSuccessor(PredBB->succ_begin());
839 assert(PredBB->succ_empty() &&
843 PredBB->addSuccessor(*I);
870 // from PredBB.
929 MachineBasicBlock *PredBB = *PI;
930 if (std::find(TDBBs.begin(), TDBBs.end(), PredBB) != TDBBs.end())
934 if (PredBB->succ_size() != 1)
943 // from PredBB.
945 ProcessPHI(MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi, false);
947 MachineBasicBlock::iterator Loc = PredBB->getFirstTerminator();
949 Copies.push_back(BuildMI(*PredBB, Loc, DebugLoc(),