llvm.org GIT mirror llvm / a7bed6c
[RegionInfo] Update old-style comments Authorized-by: grosser git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244441 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Kruse 4 years ago
1 changed file(s) with 16 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
4646
4747 namespace llvm {
4848
49 // RegionTraits - Class to be specialized for different users of RegionInfo
49 // Class to be specialized for different users of RegionInfo
5050 // (i.e. BasicBlocks or MachineBasicBlocks). This is only to avoid needing to
5151 // pass around an unreasonable number of template parameters.
5252 template
281281 // Save the BasicBlock RegionNodes that are element of this Region.
282282 mutable BBNodeMapT BBNodeMap;
283283
284 /// verifyBBInRegion - Check if a BB is in this Region. This check also works
284 /// Check if a BB is in this Region. This check also works
285285 /// if the region is incorrectly built. (EXPENSIVE!)
286286 void verifyBBInRegion(BlockT *BB) const;
287287
288 /// verifyWalk - Walk over all the BBs of the region starting from BB and
288 /// Walk over all the BBs of the region starting from BB and
289289 /// verify that all reachable basic blocks are elements of the region.
290290 /// (EXPENSIVE!)
291291 void verifyWalk(BlockT *BB, std::set *visitedBB) const;
292292
293 /// verifyRegionNest - Verify if the region and its children are valid
294 /// regions (EXPENSIVE!)
293 /// Verify if the region and its children are valid regions (EXPENSIVE!)
295294 void verifyRegionNest() const;
296295
297296 public:
687686 /// Map every BB to the smallest region, that contains BB.
688687 BBtoRegionMap BBtoRegion;
689688
690 // isCommonDomFrontier - Returns true if BB is in the dominance frontier of
689 // Returns true if BB is in the dominance frontier of
691690 // entry, because it was inherited from exit. In the other case there is an
692691 // edge going from entry to BB without passing exit.
693692 bool isCommonDomFrontier(BlockT *BB, BlockT *entry, BlockT *exit) const;
694693
695 // isRegion - Check if entry and exit surround a valid region, based on
694 // Check if entry and exit surround a valid region, based on
696695 // dominance tree and dominance frontier.
697696 bool isRegion(BlockT *entry, BlockT *exit) const;
698697
699 // insertShortCut - Saves a shortcut pointing from entry to exit.
698 // Saves a shortcut pointing from entry to exit.
700699 // This function may extend this shortcut if possible.
701700 void insertShortCut(BlockT *entry, BlockT *exit, BBtoBBMap *ShortCut) const;
702701
703 // getNextPostDom - Returns the next BB that postdominates N, while skipping
702 // Returns the next BB that postdominates N, while skipping
704703 // all post dominators that cannot finish a canonical region.
705704 DomTreeNodeT *getNextPostDom(DomTreeNodeT *N, BBtoBBMap *ShortCut) const;
706705
707 // isTrivialRegion - A region is trivial, if it contains only one BB.
706 // A region is trivial, if it contains only one BB.
708707 bool isTrivialRegion(BlockT *entry, BlockT *exit) const;
709708
710 // createRegion - Creates a single entry single exit region.
709 // Creates a single entry single exit region.
711710 RegionT *createRegion(BlockT *entry, BlockT *exit);
712711
713 // findRegionsWithEntry - Detect all regions starting with bb 'entry'.
712 // Detect all regions starting with bb 'entry'.
714713 void findRegionsWithEntry(BlockT *entry, BBtoBBMap *ShortCut);
715714
716 // scanForRegions - Detects regions in F.
715 // Detects regions in F.
717716 void scanForRegions(FuncT &F, BBtoBBMap *ShortCut);
718717
719 // getTopMostParent - Get the top most parent with the same entry block.
718 // Get the top most parent with the same entry block.
720719 RegionT *getTopMostParent(RegionT *region);
721720
722 // buildRegionsTree - build the region hierarchy after all region detected.
721 // Build the region hierarchy after all region detected.
723722 void buildRegionsTree(DomTreeNodeT *N, RegionT *region);
724723
725 // updateStatistics - Update statistic about created regions.
724 // Update statistic about created regions.
726725 virtual void updateStatistics(RegionT *R) = 0;
727726
728 // calculate - detect all regions in function and build the region tree.
727 // Detect all regions in function and build the region tree.
729728 void calculate(FuncT &F);
730729
731730 public: