Lines Matching refs:DestBB

423   bool canMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;
425 bool isMergingEmptyBlockProfitable(BasicBlock *BB, BasicBlock *DestBB,
908 BasicBlock *DestBB = BI->getSuccessor(0); in findDestBlockOfMergeableEmptyBlock() local
909 if (DestBB == BB) in findDestBlockOfMergeableEmptyBlock()
912 if (!canMergeBlocks(BB, DestBB)) in findDestBlockOfMergeableEmptyBlock()
913 DestBB = nullptr; in findDestBlockOfMergeableEmptyBlock()
915 return DestBB; in findDestBlockOfMergeableEmptyBlock()
948 BasicBlock *DestBB = findDestBlockOfMergeableEmptyBlock(BB); in eliminateMostlyEmptyBlocks() local
949 if (!DestBB || in eliminateMostlyEmptyBlocks()
950 !isMergingEmptyBlockProfitable(BB, DestBB, Preheaders.count(BB))) in eliminateMostlyEmptyBlocks()
960 BasicBlock *DestBB, in isMergingEmptyBlockProfitable() argument
977 if (DestBB == CBI->getSuccessor(i)) in isMergingEmptyBlockProfitable()
1008 if (!isa<PHINode>(DestBB->begin())) in isMergingEmptyBlockProfitable()
1015 for (BasicBlock *DestBBPred : predecessors(DestBB)) { in isMergingEmptyBlockProfitable()
1019 if (llvm::all_of(DestBB->phis(), [&](const PHINode &DestPN) { in isMergingEmptyBlockProfitable()
1037 DestBB == findDestBlockOfMergeableEmptyBlock(SameValueBB)) in isMergingEmptyBlockProfitable()
1048 const BasicBlock *DestBB) const { in canMergeBlocks()
1055 if (UI->getParent() != DestBB || !isa<PHINode>(UI)) in canMergeBlocks()
1060 if (UI->getParent() == DestBB) { in canMergeBlocks()
1075 const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin()); in canMergeBlocks()
1093 for (const PHINode &PN : DestBB->phis()) { in canMergeBlocks()
1132 BasicBlock *DestBB = BI->getSuccessor(0); in eliminateMostlyEmptyBlock() local
1135 << *BB << *DestBB); in eliminateMostlyEmptyBlock()
1139 if (BasicBlock *SinglePred = DestBB->getSinglePredecessor()) { in eliminateMostlyEmptyBlock()
1140 if (SinglePred != DestBB) { in eliminateMostlyEmptyBlock()
1144 MergeBlockIntoPredecessor(DestBB); in eliminateMostlyEmptyBlock()
1152 FreshBBs.erase(DestBB); in eliminateMostlyEmptyBlock()
1160 for (PHINode &PN : DestBB->phis()) { in eliminateMostlyEmptyBlock()
1187 BB->replaceAllUsesWith(DestBB); in eliminateMostlyEmptyBlock()
1191 LLVM_DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n"); in eliminateMostlyEmptyBlock()