Lines Matching defs:DestBB

90 /// is the new loop exit block, and DestBB is the old loop exit, now the
94 BasicBlock *DestBB) {
100 for (BasicBlock::iterator I = DestBB->begin();
151 BasicBlock *DestBB = TI->getSuccessor(SuccNum);
155 if (DestBB->isLandingPad()) return nullptr;
159 TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
161 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
172 // If there are any PHI nodes in DestBB, we need to update them so that they
176 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
193 // If there are any other edges from TIBB to DestBB, update those to go
195 // reducing the number of phi entries in the DestBB if relevant).
198 if (TI->getSuccessor(i) != DestBB) continue;
200 // Remove an entry for TIBB from DestBB phi nodes.
201 DestBB->removePredecessor(TIBB, DontDeleteUselessPhis);
203 // We found another edge to DestBB, go to NewBB instead.
224 // anything, as there are other successors of DestBB. However, if all other
225 // predecessors of DestBB are already dominated by DestBB (e.g. DestBB is a
226 // loop header) then NewBB dominates DestBB.
231 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
236 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB);
259 DestBBNode = DT->getNode(DestBB);
268 // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it
271 if (!DestBBNode) DestBBNode = DT->getNode(DestBB);
282 if (Loop *DestLoop = LI->getLoopFor(DestBB)) {
297 assert(DestLoop->getHeader() == DestBB &&
303 // If TIBB is in a loop and DestBB is outside of that loop, we may need
305 if (!TIL->contains(DestBB) &&
312 createPHIsForSplitLoopExit(TIBB, NewBB, DestBB);
315 // edge is if after the split there exists some edge from TIL to DestBB
316 // *and* the only edge into DestBB from outside of TIL is that of
319 // second isn't true, then DestBB was not in LoopSimplify form prior to
324 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB); I != E;
337 assert(!DestBB->isLandingPad() &&
340 SplitBlockPredecessors(DestBB, LoopPreds, "split", P);
342 createPHIsForSplitLoopExit(LoopPreds, NewExitBB, DestBB);