Home | History | Annotate | Download | only in Analysis

Lines Matching defs:exit

9 // Detects single entry single exit regions in the control flow graph.
34 RegionBase<Tr>::RegionBase(BlockT *Entry, BlockT *Exit,
37 : RegionNodeBase<Tr>(Parent, Entry, 1), RI(RInfo), DT(dt), exit(Exit) {}
59 assert(exit && "No exit to replace!");
60 exit = BB;
108 BlockT *entry = getEntry(), *exit = getExit();
111 if (!exit)
115 !(DT->dominates(exit, BB) && DT->dominates(entry, exit)));
183 BlockT *exit = getExit();
187 if (!exit)
190 for (PredIterTy PI = InvBlockTraits::child_begin(exit),
191 PE = InvBlockTraits::child_end(exit);
240 BlockT *entry = getEntry(), *exit = getExit();
245 if (!contains(*SI) && exit != *SI)
247 "to the exit node!");
263 BlockT *exit = getExit();
272 if (*SI != exit && visited->find(*SI) == visited->end())
424 assert(I != children.end() && "Region does not exit. Unable to remove.");
441 unsigned NumSuccessors = Tr::getNumSuccessors(exit);
446 RegionT *R = RI->getRegionFor(exit);
448 if (R->getEntry() != exit) {
454 if (Tr::getNumSuccessors(exit) == 1)
455 return new RegionT(getEntry(), *BlockTraits::child_begin(exit), RI, DT);
459 while (R->getParent() && R->getParent()->getEntry() == exit)
558 BlockT *exit) const {
563 if (DT->dominates(entry, P) && !DT->dominates(exit, P))
571 bool RegionInfoBase<Tr>::isRegion(BlockT *entry, BlockT *exit) const {
572 assert(entry && exit && "entry and exit must not be null!");
577 // Exit is the header of a loop that contains the entry. In this case,
578 exit.
579 if (!DT->dominates(entry, exit)) {
583 if (*SI != exit && *SI != entry)
590 DST *exitSuccs = &DF->find(exit)->second;
595 if (*SI == exit || *SI == entry)
599 if (!isCommonDomFrontier(*SI, entry, exit))
606 if (DT->properlyDominates(entry, *SI) && *SI != exit)
614 void RegionInfoBase<Tr>::insertShortCut(BlockT *entry, BlockT *exit,
616 assert(entry && exit && "entry and exit must not be null!");
618 typename BBtoBBMap::iterator e = ShortCut->find(exit);
621 // No further region at exit available.
622 (*ShortCut)[entry] = exit;
624 // We found a region e that starts at exit. Therefore (entry, e->second)
625 // is also a region, that is larger than (entry, exit). Insert the
644 bool RegionInfoBase<Tr>::isTrivialRegion(BlockT *entry, BlockT *exit) const {
645 assert(entry && exit && "entry and exit must not be null!");
650 if (num_successors <= 1 && exit == *(BlockTraits::child_begin(entry)))
658 BlockT *exit) {
659 assert(entry && exit && "entry and exit must not be null!");
661 if (isTrivialRegion(entry, exit))
665 new RegionT(entry, exit, static_cast<RegionInfoT *>(this), DT);
693 BlockT *exit = N->getBlock();
695 if (!exit)
698 if (isRegion(entry, exit)) {
699 RegionT *newRegion = createRegion(entry, exit);
705 lastExit = exit;
709 if (!DT->dominates(entry, exit))
745 // Passed region exit
831 BlockT *Exit = nullptr;
839 // Get the single exit of BB.
841 Exit = R->getExit();
843 Exit = *BlockTraits::child_begin(BB);
844 else // No single exit exists.
845 return Exit;
847 // Get largest region that starts at Exit.
848 RegionT *ExitR = getRegionFor(Exit);
850 ExitR->getParent()->getEntry() == Exit)
853 for (PredIterTy PI = InvBlockTraits::child_begin(Exit),
854 PE = InvBlockTraits::child_end(Exit);
861 if (DT->dominates(Exit, BB))
864 BB = Exit;
867 return Exit;
912 // ShortCut a function where for every BB the exit of the largest region