Lines Matching defs:DestBB

82 /// is the new loop exit block, and DestBB is the old loop exit, now the
86 BasicBlock *DestBB) {
92 for (BasicBlock::iterator I = DestBB->begin();
141 BasicBlock *DestBB = TI->getSuccessor(SuccNum);
145 if (DestBB->isEHPad()) return nullptr;
149 TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
151 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
162 // If there are any PHI nodes in DestBB, we need to update them so that they
166 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
183 // If there are any other edges from TIBB to DestBB, update those to go
185 // reducing the number of phi entries in the DestBB if relevant).
188 if (TI->getSuccessor(i) != DestBB) continue;
190 // Remove an entry for TIBB from DestBB phi nodes.
191 DestBB->removePredecessor(TIBB, Options.DontDeleteUselessPHIs);
193 // We found another edge to DestBB, go to NewBB instead.
206 // anything, as there are other successors of DestBB. However, if all other
207 // predecessors of DestBB are already dominated by DestBB (e.g. DestBB is a
208 // loop header) then NewBB dominates DestBB.
213 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
218 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB);
241 DestBBNode = DT->getNode(DestBB);
250 // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it
253 if (!DestBBNode) DestBBNode = DT->getNode(DestBB);
264 if (Loop *DestLoop = LI->getLoopFor(DestBB)) {
279 assert(DestLoop->getHeader() == DestBB &&
286 // If TIBB is in a loop and DestBB is outside of that loop, we may need
288 if (!TIL->contains(DestBB)) {
294 createPHIsForSplitLoopExit(TIBB, NewBB, DestBB);
298 // edge is if after the split there exists some edge from TIL to DestBB
299 // *and* the only edge into DestBB from outside of TIL is that of
302 // second isn't true, then DestBB was not in LoopSimplify form prior to
307 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB); I != E;
320 assert(!DestBB->isEHPad() && "We don't split edges to EH pads!");
322 DestBB, LoopPreds, "split", DT, LI, Options.PreserveLCSSA);
324 createPHIsForSplitLoopExit(LoopPreds, NewExitBB, DestBB);