Home | History | Annotate | Download | only in Utils

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();
142 BasicBlock *DestBB = TI->getSuccessor(SuccNum);
146 if (DestBB->isLandingPad()) return nullptr;
150 TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
152 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
163 // If there are any PHI nodes in DestBB, we need to update them so that they
167 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
184 // If there are any other edges from TIBB to DestBB, update those to go
186 // reducing the number of phi entries in the DestBB if relevant).
189 if (TI->getSuccessor(i) != DestBB) continue;
191 // Remove an entry for TIBB from DestBB phi nodes.
192 DestBB->removePredecessor(TIBB, Options.DontDeleteUselessPHIs);
194 // We found another edge to DestBB, go to NewBB instead.
208 // anything, as there are other successors of DestBB. However, if all other
209 // predecessors of DestBB are already dominated by DestBB (e.g. DestBB is a
210 // loop header) then NewBB dominates DestBB.
215 if (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
220 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB);
243 DestBBNode = DT->getNode(DestBB);
252 // If NewBBDominatesDestBB, then NewBB dominates DestBB, otherwise it
255 if (!DestBBNode) DestBBNode = DT->getNode(DestBB);
266 if (Loop *DestLoop = LI->getLoopFor(DestBB)) {
281 assert(DestLoop->getHeader() == DestBB &&
288 // If TIBB is in a loop and DestBB is outside of that loop, we may need
290 if (!TIL->contains(DestBB)) {
296 createPHIsForSplitLoopExit(TIBB, NewBB, DestBB);
300 // edge is if after the split there exists some edge from TIL to DestBB
301 // *and* the only edge into DestBB from outside of TIL is that of
304 // second isn't true, then DestBB was not in LoopSimplify form prior to
309 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB); I != E;
322 assert(!DestBB->isLandingPad() &&
325 DestBB, LoopPreds, "split", AA, DT, LI, Options.PreserveLCSSA);
327 createPHIsForSplitLoopExit(LoopPreds, NewExitBB, DestBB);