• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/

Lines Matching defs:DestBB

105 /// of preds inside the loop, SplitBB is the new loop exit block, and DestBB is
109 BasicBlock *DestBB) {
115 for (PHINode &PN : DestBB->phis()) {
147 BasicBlock *DestBB = TI->getSuccessor(SuccNum);
151 if (DestBB->isEHPad()) return nullptr;
154 isa<UnreachableInst>(DestBB->getFirstNonPHIOrDbgOrLifetime()))
166 // edge is if after the split there exists some edge from TIL to DestBB
167 // *and* the only edge into DestBB from outside of TIL is that of
170 // second isn't true, then DestBB was not in LoopSimplify form prior to
174 for (pred_iterator I = pred_begin(DestBB), E = pred_end(DestBB); I != E;
200 TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
202 BranchInst *NewBI = BranchInst::Create(DestBB, NewBB);
213 // If there are any PHI nodes in DestBB, we need to update them so that they
217 for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
234 // If there are any other edges from TIBB to DestBB, update those to go
236 // reducing the number of phi entries in the DestBB if relevant).
239 if (TI->getSuccessor(i) != DestBB) continue;
241 // Remove an entry for TIBB from DestBB phi nodes.
242 DestBB->removePredecessor(TIBB, Options.KeepOneInputPHIs);
244 // We found another edge to DestBB, go to NewBB instead.
255 DestBB, NewBB, {TIBB}, Options.MergeIdenticalEdges);
264 // TIBB -------\\------> DestBB
266 // First, inform the DT about the new path from TIBB to DestBB via NewBB,
267 // then delete the old edge from TIBB to DestBB. By doing this in that order
268 // DestBB stays reachable in the DT the whole time and its subtree doesn't
272 Updates.push_back({DominatorTree::Insert, NewBB, DestBB});
273 if (llvm::find(successors(TIBB), DestBB) == succ_end(TIBB))
274 Updates.push_back({DominatorTree::Delete, TIBB, DestBB});
287 if (Loop *DestLoop = LI->getLoopFor(DestBB)) {
302 assert(DestLoop->getHeader() == DestBB &&
309 // If TIBB is in a loop and DestBB is outside of that loop, we may need
311 if (!TIL->contains(DestBB)) {
317 createPHIsForSplitLoopExit(TIBB, NewBB, DestBB);
321 assert(!DestBB->isEHPad() && "We don't split edges to EH pads!");
323 DestBB, LoopPreds, "split", DT, LI, MSSAU, Options.PreserveLCSSA);
325 createPHIsForSplitLoopExit(LoopPreds, NewExitBB, DestBB);