Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Unloop

433 /// Find the new parent loop for all blocks within the "unloop" whose last
436 Loop *Unloop;
441 // Map unloop's immediate subloops to their nearest reachable parents. Nested
448 // directly contained by the original unloop.
453 Unloop(UL), LI(LInfo), DFS(UL), FoundIB(false) {}
467 /// contained within the original "unloop".
469 if (Unloop->getNumBlocks()) {
480 // For reducible loops, NL is now an ancestor of Unloop.
481 assert((NL != Unloop && (!NL || NL->contains(Unloop))) &&
488 assert((FoundIB || Unloop->contains(L)) && "uninitialized successor");
492 // Each irreducible loop within the unloop induces a round of iteration using
496 assert(NIters < Unloop->getNumBlocks() && "runaway iterative algorithm");
507 assert(NL != Unloop && (!NL || NL->contains(Unloop)) &&
516 /// removeBlocksFromAncestors - Remove unloop's blocks from all ancestors below
519 // Remove all unloop's blocks (including those in nested subloops) from
521 for (Loop::block_iterator BI = Unloop->block_begin(),
522 BE = Unloop->block_end(); BI != BE; ++BI) {
524 if (Unloop->contains(OuterParent)) {
525 while (OuterParent->getParentLoop() != Unloop)
529 // Remove blocks from former Ancestors except Unloop itself which will be
531 for (Loop *OldParent = Unloop->getParentLoop(); OldParent != OuterParent;
540 /// nested within unloop.
542 while (!Unloop->empty()) {
543 Loop *Subloop = *llvm::prior(Unloop->end());
544 Unloop->removeChildLoop(llvm::prior(Unloop->end()));
561 // Initially for blocks directly contained by Unloop, NearLoop == Unloop and
566 if (NearLoop != Unloop && Unloop->contains(NearLoop)) {
568 // Find the subloop ancestor that is directly contained within Unloop.
569 while (Subloop->getParentLoop() != Unloop) {
573 // Get the current nearest parent of the Subloop exits, initially Unloop.
575 SubloopParents.insert(std::make_pair(Subloop, Unloop)).first->second;
581 NearLoop = 0; // unloop blocks may now exit the function.
588 if (L == Unloop) {
594 if (L != Unloop && Unloop->contains(L)) {
600 assert(L->getParentLoop() == Unloop && "cannot skip into nested loops");
604 // L could be Unloop if the only exit was an irreducible backedge.
606 if (L == Unloop) {
609 // Handle critical edges from Unloop into a sibling loop.
610 if (L && !L->contains(Unloop)) {
614 if (NearLoop == Unloop || !NearLoop || NearLoop->contains(L))
634 /// "unloop". Find a new parent for the blocks contained within unloop and
638 /// Note that Unloop may now be an empty loop. Calling Loop::getHeader without
640 void LoopInfo::updateUnloop(Loop *Unloop) {
643 if (!Unloop->getParentLoop()) {
644 // Since BBLoop had no parent, Unloop blocks are no longer in a loop.
645 for (Loop::block_iterator I = Unloop->block_begin(),
646 E = Unloop->block_end(); I != E; ++I) {
649 if (getLoopFor(*I) != Unloop)
652 // Blocks no longer have a parent but are still referenced by Unloop until
653 // the Unloop object is deleted.
660 if (*I == Unloop) {
667 while (!Unloop->empty())
668 LI.addTopLevelLoop(Unloop->removeChildLoop(llvm::prior(Unloop->end())));
675 UnloopUpdater Updater(Unloop, this);
684 // Remove unloop from its parent loop.
685 Loop *ParentLoop = Unloop->getParentLoop();
688 if (*I == Unloop) {