Home | History | Annotate | Download | only in Analysis

Lines Matching defs:exit

9 // Detects single entry single exit regions in the control flow graph.
44 RegionBase<Tr>::RegionBase(BlockT *Entry, BlockT *Exit,
47 : RegionNodeBase<Tr>(Parent, Entry, 1), RI(RInfo), DT(dt), exit(Exit) {}
63 assert(exit && "No exit to replace!");
64 exit = BB;
110 BlockT *entry = getEntry(), *exit = getExit();
113 if (!exit)
117 !(DT->dominates(exit, BB) && DT->dominates(entry, exit)));
185 if (!exit)
188 for (PredIterTy PI = InvBlockTraits::child_begin(exit),
189 PE = InvBlockTraits::child_end(exit);
205 BlockT *exit = getExit();
208 if (!exit)
211 for (BlockT *Pred : make_range(InvBlockTraits::child_begin(exit),
212 InvBlockTraits::child_end(exit))) {
259 BlockT *entry = getEntry(), *exit = getExit();
263 if (!contains(Succ) && exit != Succ)
265 "to the exit node!");
280 BlockT *exit = getExit();
288 if (Succ != exit && visited->find(Succ) == visited->end())
443 assert(I != children.end() && "Region does not exit. Unable to remove.");
460 unsigned NumSuccessors = Tr::getNumSuccessors(exit);
465 RegionT *R = RI->getRegionFor(exit);
467 if (R->getEntry() != exit) {
472 if (Tr::getNumSuccessors(exit) == 1)
473 return new RegionT(getEntry(), *BlockTraits::child_begin(exit), RI, DT);
477 while (R->getParent() && R->getParent()->getEntry() == exit)
567 BlockT *exit) const {
570 if (DT->dominates(entry, P) && !DT->dominates(exit, P))
578 bool RegionInfoBase<Tr>::isRegion(BlockT *entry, BlockT *exit) const {
579 assert(entry && exit && "entry and exit must not be null!");
585 // Exit is the header of a loop that contains the entry. In this case,
586 // the dominance frontier must only contain the exit.
587 exit)) {
591 if (*SI != exit && *SI != entry)
598 DST *exitSuccs = &DF->find(exit)->second;
602 if (Succ == exit || Succ == entry)
606 if (!isCommonDomFrontier(Succ, entry, exit))
612 if (DT->properlyDominates(entry, Succ) && Succ != exit)
620 void RegionInfoBase<Tr>::insertShortCut(BlockT *entry, BlockT *exit,
622 assert(entry && exit && "entry and exit must not be null!");
624 typename BBtoBBMap::iterator e = ShortCut->find(exit);
627 // No further region at exit available.
628 (*ShortCut)[entry] = exit;
630 // We found a region e that starts at exit. Therefore (entry, e->second)
631 // is also a region, that is larger than (entry, exit). Insert the
650 bool RegionInfoBase<Tr>::isTrivialRegion(BlockT *entry, BlockT *exit) const {
651 assert(entry && exit && "entry and exit must not be null!");
656 if (num_successors <= 1 && exit == *(BlockTraits::child_begin(entry)))
664 BlockT *exit) {
665 assert(entry && exit && "entry and exit must not be null!");
667 if (isTrivialRegion(entry, exit))
671 new RegionT(entry, exit, static_cast<RegionInfoT *>(this), DT);
699 BlockT *exit = N->getBlock();
701 if (!exit)
704 if (isRegion(entry, exit)) {
705 RegionT *newRegion = createRegion(entry, exit);
711 lastExit = exit;
715 if (!DT->dominates(entry, exit))
752 // Passed region exit
837 BlockT *Exit = nullptr;
845 // Get the single exit of BB.
847 Exit = R->getExit();
849 Exit = *BlockTraits::child_begin(BB);
850 else // No single exit exists.
851 return Exit;
853 // Get largest region that starts at Exit.
854 RegionT *ExitR = getRegionFor(Exit);
856 ExitR->getParent()->getEntry() == Exit)
859 for (BlockT *Pred : make_range(InvBlockTraits::child_begin(Exit),
860 InvBlockTraits::child_end(Exit))) {
866 if (DT->dominates(Exit, BB))
869 BB = Exit;
872 return Exit;
917 // ShortCut a function where for every BB the exit of the largest region