Lines Matching defs:Unloop

694   Loop &Unloop;
710 UnloopUpdater(Loop *UL, LoopInfo *LInfo) : Unloop(*UL), LI(LInfo), DFS(UL) {}
726 if (Unloop.getNumBlocks()) {
736 // For reducible loops, NL is now an ancestor of Unloop.
737 assert((NL != &Unloop && (!NL || NL->contains(&Unloop))) &&
743 assert((FoundIB || Unloop.contains(L)) && "uninitialized successor");
751 assert(NIters < Unloop.getNumBlocks() && "runaway iterative algorithm");
764 assert(NL != &Unloop && (!NL || NL->contains(&Unloop)) &&
777 for (BasicBlock *BB : Unloop.blocks()) {
779 if (Unloop.contains(OuterParent)) {
780 while (OuterParent->getParentLoop() != &Unloop)
784 // Remove blocks from former Ancestors except Unloop itself which will be
786 for (Loop *OldParent = Unloop.getParentLoop(); OldParent != OuterParent;
796 while (!Unloop.isInnermost()) {
797 Loop *Subloop = *std::prev(Unloop.end());
798 Unloop.removeChildLoop(std::prev(Unloop.end()));
815 // Initially for blocks directly contained by Unloop, NearLoop == Unloop and
820 if (NearLoop != &Unloop && Unloop.contains(NearLoop)) {
822 // Find the subloop ancestor that is directly contained within Unloop.
823 while (Subloop->getParentLoop() != &Unloop) {
827 // Get the current nearest parent of the Subloop exits, initially Unloop.
828 NearLoop = SubloopParents.insert({Subloop, &Unloop}).first->second;
840 if (L == &Unloop) {
846 if (L != &Unloop && Unloop.contains(L)) {
852 assert(L->getParentLoop() == &Unloop && "cannot skip into nested loops");
856 // L could be Unloop if the only exit was an irreducible backedge.
858 if (L == &Unloop) {
861 // Handle critical edges from Unloop into a sibling loop.
862 if (L && !L->contains(&Unloop)) {
866 if (NearLoop == &Unloop || !NearLoop || NearLoop->contains(L))
887 void LoopInfo::erase(Loop *Unloop) {
888 assert(!Unloop->isInvalid() && "Loop has already been erased!");
890 auto InvalidateOnExit = make_scope_exit([&]() { destroy(Unloop); });
893 if (Unloop->isOutermost()) {
894 // Since BBLoop had no parent, Unloop blocks are no longer in a loop.
895 for (BasicBlock *BB : Unloop->blocks()) {
897 if (getLoopFor(BB) != Unloop)
900 // Blocks no longer have a parent but are still referenced by Unloop until
901 // the Unloop object is deleted.
908 if (*I == Unloop) {
915 while (!Unloop->isInnermost())
916 addTopLevelLoop(Unloop->removeChildLoop(std::prev(Unloop->end())));
923 UnloopUpdater Updater(Unloop, this);
933 Loop *ParentLoop = Unloop->getParentLoop();
936 if (*I == Unloop) {