Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:DestBB

169     bool canMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;
381 BasicBlock *DestBB = BI->getSuccessor(0);
382 if (DestBB == BB)
385 if (!canMergeBlocks(BB, DestBB))
394 /// Return true if we can merge BB into DestBB if there is a single
398 const BasicBlock *DestBB) const {
406 if (UI->getParent() != DestBB || !isa<PHINode>(UI))
408 // If User is inside DestBB block and it is a PHINode then check
411 if (UI->getParent() == DestBB) {
423 // If BB and DestBB contain any common predecessors, then the phi nodes in BB
424 // and DestBB may have conflicting incoming values for the block. If so, we
426 const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin());
439 // Walk the preds of DestBB.
443 BBI = DestBB->begin();
467 BasicBlock *DestBB = BI->getSuccessor(0);
469 DEBUG(dbgs() << "MERGING MOSTLY EMPTY BLOCKS - BEFORE:\n" << *BB << *DestBB);
473 if (BasicBlock *SinglePred = DestBB->getSinglePredecessor()) {
474 if (SinglePred != DestBB) {
478 MergeBasicBlockIntoOnlyPred(DestBB, nullptr);
483 DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
488 // Otherwise, we have multiple predecessors of BB. Update the PHIs in DestBB
491 for (BasicBlock::iterator BBI = DestBB->begin();
518 // DestBB and remove BB.
519 BB->replaceAllUsesWith(DestBB);
523 DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");