Lines Matching defs:DestBB

123 /// is the new loop exit block, and DestBB is the old loop exit, now the
127 BasicBlock *DestBB) {
133 for (BasicBlock::iterator I = DestBB->begin();
178 BasicBlock *DestBB = TI->getSuccessor(SuccNum);
182 if (DestBB->isLandingPad()) return 0;
186 TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
188 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
199 // If there are any PHI nodes in DestBB, we need to update them so that they
203 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
220 // If there are any other edges from TIBB to DestBB, update those to go
222 // reducing the number of phi entries in the DestBB if relevant).
225 if (TI->getSuccessor(i) != DestBB) continue;
227 // Remove an entry for TIBB from DestBB phi nodes.
228 DestBB->removePredecessor(TIBB, DontDeleteUselessPhis);
230 // We found another edge to DestBB, go to NewBB instead.
250 // anything, as there are other successors of DestBB. However, if all other
251 // predecessors of DestBB are already dominated by DestBB (e.g. DestBB is a
252 // loop header) then NewBB dominates DestBB.
257 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
262 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB);
285 DestBBNode = DT->getNode(DestBB);
294 // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it
297 if (!DestBBNode) DestBBNode = DT->getNode(DestBB);
308 if (Loop *DestLoop = LI->getLoopFor(DestBB)) {
323 assert(DestLoop->getHeader() == DestBB &&
329 // If TIBB is in a loop and DestBB is outside of that loop, split the
332 if (!TIL->contains(DestBB) &&
341 CreatePHIsForSplitLoopExit(OrigPred, NewBB, DestBB);
394 PI->splitEdge(TIBB, DestBB, NewBB, MergeIdenticalEdges);