Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Unloop

419 /// Find the new parent loop for all blocks within the "unloop" whose last
422 Loop *Unloop;
427 // Map unloop's immediate subloops to their nearest reachable parents. Nested
434 // directly contained by the original unloop.
439 Unloop(UL), LI(LInfo), DFS(UL), FoundIB(false) {}
453 /// contained within the original "unloop".
455 if (Unloop->getNumBlocks()) {
466 // For reducible loops, NL is now an ancestor of Unloop.
467 assert((NL != Unloop && (!NL || NL->contains(Unloop))) &&
474 assert((FoundIB || Unloop->contains(L)) && "uninitialized successor");
478 // Each irreducible loop within the unloop induces a round of iteration using
482 assert(NIters < Unloop->getNumBlocks() && "runaway iterative algorithm");
493 assert(NL != Unloop && (!NL || NL->contains(Unloop)) &&
502 /// removeBlocksFromAncestors - Remove unloop's blocks from all ancestors below
505 // Remove all unloop's blocks (including those in nested subloops) from
507 for (Loop::block_iterator BI = Unloop->block_begin(),
508 BE = Unloop->block_end(); BI != BE; ++BI) {
510 if (Unloop->contains(OuterParent)) {
511 while (OuterParent->getParentLoop() != Unloop)
515 // Remove blocks from former Ancestors except Unloop itself which will be
517 for (Loop *OldParent = Unloop->getParentLoop(); OldParent != OuterParent;
526 /// nested within unloop.
528 while (!Unloop->empty()) {
529 Loop *Subloop = *std::prev(Unloop->end());
530 Unloop->removeChildLoop(std::prev(Unloop->end()));
547 // Initially for blocks directly contained by Unloop, NearLoop == Unloop and
552 if (NearLoop != Unloop && Unloop->contains(NearLoop)) {
554 // Find the subloop ancestor that is directly contained within Unloop.
555 while (Subloop->getParentLoop() != Unloop) {
559 // Get the current nearest parent of the Subloop exits, initially Unloop.
561 SubloopParents.insert(std::make_pair(Subloop, Unloop)).first->second;
567 NearLoop = nullptr; // unloop blocks may now exit the function.
574 if (L == Unloop) {
580 if (L != Unloop && Unloop->contains(L)) {
586 assert(L->getParentLoop() == Unloop && "cannot skip into nested loops");
590 // L could be Unloop if the only exit was an irreducible backedge.
592 if (L == Unloop) {
595 // Handle critical edges from Unloop into a sibling loop.
596 if (L && !L->contains(Unloop)) {
600 if (NearLoop == Unloop || !NearLoop || NearLoop->contains(L))
620 /// "unloop". Find a new parent for the blocks contained within unloop and
624 /// Note that Unloop may now be an empty loop. Calling Loop::getHeader without
626 void LoopInfo::updateUnloop(Loop *Unloop) {
629 if (!Unloop->getParentLoop()) {
630 // Since BBLoop had no parent, Unloop blocks are no longer in a loop.
631 for (Loop::block_iterator I = Unloop->block_begin(),
632 E = Unloop->block_end(); I != E; ++I) {
635 if (getLoopFor(*I) != Unloop)
638 // Blocks no longer have a parent but are still referenced by Unloop until
639 // the Unloop object is deleted.
646 if (*I == Unloop) {
653 while (!Unloop->empty())
654 LI.addTopLevelLoop(Unloop->removeChildLoop(std::prev(Unloop->end())));
661 UnloopUpdater Updater(Unloop, this);
670 // Remove unloop from its parent loop.
671 Loop *ParentLoop = Unloop->getParentLoop();
674 if (*I == Unloop) {