• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/

Lines Matching defs:DestBB

382     bool canMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;
384 bool isMergingEmptyBlockProfitable(BasicBlock *BB, BasicBlock *DestBB,
670 BasicBlock *DestBB = BI->getSuccessor(0);
671 if (DestBB == BB)
674 if (!canMergeBlocks(BB, DestBB))
675 DestBB = nullptr;
677 return DestBB;
706 BasicBlock *DestBB = findDestBlockOfMergeableEmptyBlock(BB);
707 if (!DestBB ||
708 !isMergingEmptyBlockProfitable(BB, DestBB, Preheaders.count(BB)))
718 BasicBlock *DestBB,
735 if (DestBB == CBI->getSuccessor(i))
741 // of PHIs in DestBB. In such case, merging BB and DestBB would cause ISel to
764 // value for the PHIs in the DestBB, we consider them together. In such
767 if (!isa<PHINode>(DestBB->begin()))
773 // DestBB are the same as the ones from BB.
774 for (pred_iterator PI = pred_begin(DestBB), E = pred_end(DestBB); PI != E;
780 if (llvm::all_of(DestBB->phis(), [&](const PHINode &DestPN) {
798 DestBB == findDestBlockOfMergeableEmptyBlock(SameValueBB))
805 /// Return true if we can merge BB into DestBB if there is a single
809 const BasicBlock *DestBB) const {
816 if (UI->getParent() != DestBB || !isa<PHINode>(UI))
818 // If User is inside DestBB block and it is a PHINode then check
821 if (UI->getParent() == DestBB) {
833 // If BB and DestBB contain any common predecessors, then the phi nodes in BB
834 // and DestBB may have conflicting incoming values for the block. If so, we
836 const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin());
849 // Walk the preds of DestBB.
853 for (const PHINode &PN : DestBB->phis()) {
875 BasicBlock *DestBB = BI->getSuccessor(0);
878 << *BB << *DestBB);
882 if (BasicBlock *SinglePred = DestBB->getSinglePredecessor()) {
883 if (SinglePred != DestBB) {
886 // Merge DestBB into SinglePred/BB and delete it.
887 MergeBlockIntoPredecessor(DestBB);
889 // DestBB(=its single successor) is the one that was deleted.
895 // Otherwise, we have multiple predecessors of BB. Update the PHIs in DestBB
897 for (PHINode &PN : DestBB->phis()) {
923 // DestBB and remove BB.
924 BB->replaceAllUsesWith(DestBB);
928 LLVM_DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");