Lines Matching refs:ExitBB
254 const BasicBlock &ExitBB) {
255 for (const Instruction &I : ExitBB) {
363 static void rewritePHINodesForExitAndUnswitchedBlocks(BasicBlock &ExitBB,
368 assert(&ExitBB != &UnswitchedBB &&
371 for (PHINode &PN : ExitBB.phis()) {
400 NewPN->addIncoming(&PN, &ExitBB);
420 for (auto *ExitBB : Exits)
421 if (Loop *ExitL = LI.getLoopFor(ExitBB))
477 // Return the top-most loop containing ExitBB and having ExitBB as exiting block
478 // or the loop containing ExitBB, if there is no parent loop containing ExitBB
480 static Loop *getTopMostExitingLoop(const BasicBlock *ExitBB,
482 Loop *TopMost = LI.getLoopFor(ExitBB);
485 if (Current->isLoopExiting(ExitBB))
902 BasicBlock *ExitBB = std::get<1>(ExitCase);
906 if (pred_empty(ExitBB)) {
908 if (UnswitchedExitBBs.insert(ExitBB).second)
909 rewritePHINodesForUnswitchedExitBlock(*ExitBB, *ParentBB, *OldPH);
915 BasicBlock *&SplitExitBB = SplitExitBBMap[ExitBB];
918 SplitExitBB = SplitBlock(ExitBB, ExitBB->begin(), &DT, &LI, MSSAU);
919 rewritePHINodesForExitAndUnswitchedBlocks(*ExitBB, *SplitExitBB,
1211 for (auto *ExitBB : ExitBlocks) {
1212 if (SkipBlock(ExitBB))
1220 auto *MergeBB = SplitBlock(ExitBB, ExitBB->begin(), &DT, &LI, MSSAU);
1225 MergeBB->takeName(ExitBB);
1226 ExitBB->setName(Twine(MergeBB->getName()) + ".split");
1229 auto *ClonedExitBB = CloneBlock(ExitBB);
1237 llvm::make_range(ExitBB->begin(), std::prev(ExitBB->end())),
1263 MergePN->addIncoming(&I, ExitBB);
1442 for (auto *ExitBB : ExitBlocks)
1443 if (auto *ClonedExitBB = cast_or_null<BasicBlock>(VMap.lookup(ExitBB)))
1444 if (Loop *ExitL = LI.getLoopFor(ExitBB)) {
1597 BasicBlock *ExitBB = OrderedClonedExitsInLoops.pop_back_val();
1598 Loop *ExitL = ExitLoopMap.lookup(ExitBB);
1602 Worklist.push_back(ExitBB);
1919 for (auto *ExitBB : ExitBlocks)
1920 if (Loop *ExitL = LI.getLoopFor(ExitBB)) {
1922 ExitsInLoops.push_back(ExitBB);
1999 BasicBlock *ExitBB = ExitsInLoops.pop_back_val();
2000 Loop &ExitL = *LI.getLoopFor(ExitBB);
2012 Worklist.push_back(ExitBB);
2264 for (auto *ExitBB : ExitBlocks) {
2265 // ExitBB can be an exit block for several levels in the loop nest. Make
2267 Loop *NewOuterExitL = getTopMostExitingLoop(ExitBB, LI);
3304 for (auto *ExitBB : ExitBlocks) {
3305 auto *I = ExitBB->getFirstNonPHI();