LLVM  8.0.1
Classes | Public Types | Public Member Functions | Friends | List of all members
llvm::RegionBase< Tr > Class Template Reference

A single entry single exit Region. More...

#include "llvm/Analysis/RegionInfo.h"

Inheritance diagram for llvm::RegionBase< Tr >:
Inheritance graph
[legend]
Collaboration diagram for llvm::RegionBase< Tr >:
Collaboration graph
[legend]

Classes

class  block_iterator_wrapper
 

Public Types

enum  PrintStyle { PrintNone, PrintBB, PrintRN }
 PrintStyle - Print region in difference ways. More...
 
- Public Types inherited from llvm::RegionNodeBase< Tr >
using BlockT = typename Tr::BlockT
 
using RegionT = typename Tr::RegionT
 

Public Member Functions

 RegionBase (BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent=nullptr)
 Create a new region. More...
 
 RegionBase (const RegionBase &)=delete
 
RegionBaseoperator= (const RegionBase &)=delete
 
 ~RegionBase ()
 Delete the Region and all its subregions. More...
 
BlockT * getEntry () const
 Get the entry BasicBlock of the Region. More...
 
void replaceEntry (BlockT *BB)
 Replace the entry basic block of the region with the new basic block. More...
 
void replaceExit (BlockT *BB)
 Replace the exit basic block of the region with the new basic block. More...
 
void replaceEntryRecursive (BlockT *NewEntry)
 Recursively replace the entry basic block of the region. More...
 
void replaceExitRecursive (BlockT *NewExit)
 Recursively replace the exit basic block of the region. More...
 
BlockT * getExit () const
 Get the exit BasicBlock of the Region. More...
 
RegionTgetParent () const
 Get the parent of the Region. More...
 
RegionNodeT * getNode () const
 Get the RegionNode representing the current Region. More...
 
unsigned getDepth () const
 Get the nesting level of this Region. More...
 
bool isTopLevelRegion () const
 Check if a Region is the TopLevel region. More...
 
RegionTgetExpandedRegion () const
 Return a new (non-canonical) region, that is obtained by joining this region with its predecessors. More...
 
BlockT * getEnteringBlock () const
 Return the first block of this region's single entry edge, if existing. More...
 
BlockT * getExitingBlock () const
 Return the first block of this region's single exit edge, if existing. More...
 
bool getExitingBlocks (SmallVectorImpl< BlockT *> &Exitings) const
 Collect all blocks of this region's single exit edge, if existing. More...
 
bool isSimple () const
 Is this a simple region? More...
 
std::string getNameStr () const
 Returns the name of the Region. More...
 
RegionInfoT * getRegionInfo () const
 Return the RegionInfo object, that belongs to this Region. More...
 
void print (raw_ostream &OS, bool printTree=true, unsigned level=0, PrintStyle Style=PrintNone) const
 Print the region. More...
 
void dump () const
 Print the region to stderr. More...
 
bool contains (const BlockT *BB) const
 Check if the region contains a BasicBlock. More...
 
bool contains (const RegionT *SubRegion) const
 Check if the region contains another region. More...
 
bool contains (const InstT *Inst) const
 Check if the region contains an Instruction. More...
 
bool contains (const LoopT *L) const
 Check if the region contains a loop. More...
 
LoopT * outermostLoopInRegion (LoopT *L) const
 Get the outermost loop in the region that contains a loop. More...
 
LoopT * outermostLoopInRegion (LoopInfoT *LI, BlockT *BB) const
 Get the outermost loop in the region that contains a basic block. More...
 
RegionTgetSubRegionNode (BlockT *BB) const
 Get the subregion that starts at a BasicBlock. More...
 
RegionNodeT * getNode (BlockT *BB) const
 Get the RegionNode for a BasicBlock. More...
 
RegionNodeT * getBBNode (BlockT *BB) const
 Get the BasicBlock RegionNode for a BasicBlock. More...
 
void addSubRegion (RegionT *SubRegion, bool moveChildren=false)
 Add a new subregion to this Region. More...
 
RegionTremoveSubRegion (RegionT *SubRegion)
 Remove a subregion from this Region. More...
 
void transferChildrenTo (RegionT *To)
 Move all direct child nodes of this Region to another Region. More...
 
void verifyRegion () const
 Verify if the region is a correct region. More...
 
void clearNodeCache ()
 Clear the cache for BB RegionNodes. More...
 
- Public Member Functions inherited from llvm::RegionNodeBase< Tr >
 RegionNodeBase (const RegionNodeBase &)=delete
 
RegionNodeBaseoperator= (const RegionNodeBase &)=delete
 
RegionTgetParent () const
 Get the parent Region of this RegionNode. More...
 
BlockTgetEntry () const
 Get the entry BasicBlock of this RegionNode. More...
 
template<class T >
TgetNodeAs () const
 Get the content of this RegionNode. More...
 
bool isSubRegion () const
 Is this RegionNode a subregion? More...
 
template<>
BasicBlockgetNodeAs () const
 
template<>
RegiongetNodeAs () const
 
template<>
MachineBasicBlockgetNodeAs () const
 
template<>
MachineRegiongetNodeAs () const
 

Friends

class RegionInfoBase< Tr >
 

Subregion Iterators

These iterators iterator over all subregions of this Region.

using iterator = typename RegionSet::iterator
 
using const_iterator = typename RegionSet::const_iterator
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

BasicBlock Iterators

These iterators iterate over all BasicBlocks that are contained in this Region.

The iterator also iterates over BasicBlocks that are elements of a subregion of this Region. It is therefore called a flat iterator.

using block_iterator = block_iterator_wrapper< false >
 
using const_block_iterator = block_iterator_wrapper< true >
 
using block_range = iterator_range< block_iterator >
 
using const_block_range = iterator_range< const_block_iterator >
 
block_iterator block_begin ()
 
block_iterator block_end ()
 
const_block_iterator block_begin () const
 
const_block_iterator block_end () const
 
block_range blocks ()
 Returns a range view of the basic blocks in the region. More...
 
const_block_range blocks () const
 Returns a range view of the basic blocks in the region. More...
 

Element Iterators

These iterators iterate over all BasicBlock and subregion RegionNodes that are direct children of this Region.

It does not iterate over any RegionNodes that are also element of a subregion of this Region.

using element_iterator = df_iterator< RegionNodeT *, df_iterator_default_set< RegionNodeT * >, false, GraphTraits< RegionNodeT * > >
 
using const_element_iterator = df_iterator< const RegionNodeT *, df_iterator_default_set< const RegionNodeT * >, false, GraphTraits< const RegionNodeT * > >
 
element_iterator element_begin ()
 
element_iterator element_end ()
 
iterator_range< element_iteratorelements ()
 
const_element_iterator element_begin () const
 
const_element_iterator element_end () const
 
iterator_range< const_element_iteratorelements () const
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::RegionNodeBase< Tr >
 RegionNodeBase (RegionT *Parent, BlockT *Entry, bool isSubRegion=false)
 Create a RegionNode. More...
 

Detailed Description

template<class Tr>
class llvm::RegionBase< Tr >

A single entry single exit Region.

A Region is a connected subgraph of a control flow graph that has exactly two connections to the remaining graph. It can be used to analyze or optimize parts of the control flow graph.

A simple Region is connected to the remaining graph by just two edges. One edge entering the Region and another one leaving the Region.

An extended Region (or just Region) is a subgraph that can be transform into a simple Region. The transformation is done by adding BasicBlocks that merge several entry or exit edges so that after the merge just one entry and one exit edge exists.

The Entry of a Region is the first BasicBlock that is passed after entering the Region. It is an element of the Region. The entry BasicBlock dominates all BasicBlocks in the Region.

The Exit of a Region is the first BasicBlock that is passed after leaving the Region. It is not an element of the Region. The exit BasicBlock, postdominates all BasicBlocks in the Region.

A canonical Region cannot be constructed by combining smaller Regions.

Region A is the parent of Region B, if B is completely contained in A.

Two canonical Regions either do not intersect at all or one is the parent of the other.

The Program Structure Tree is a graph (V, E) where V is the set of Regions in the control flow graph and E is the parent relation of these Regions.

Example:

/// A simple control flow graph, that contains two regions.
///
///        1
///       / |
///      2   |
///     / \   3
///    4   5  |
///    |   |  |
///    6   7  8
///     \  | /
///      \ |/       Region A: 1 -> 9 {1,2,3,4,5,6,7,8}
///        9        Region B: 2 -> 9 {2,4,5,6,7}
/// 
You can obtain more examples by either calling

<tt> "opt -regions -analyze anyprogram.ll" </tt>
or
<tt> "opt -view-regions-only anyprogram.ll" </tt>

on any LLVM file you are interested in.

The first call returns a textual representation of the program structure
tree, the second one creates a graphical representation using graphviz.  

Definition at line 68 of file RegionInfo.h.

Member Typedef Documentation

◆ block_iterator

template<class Tr>
using llvm::RegionBase< Tr >::block_iterator = block_iterator_wrapper<false>

Definition at line 609 of file RegionInfo.h.

◆ block_range

template<class Tr>
using llvm::RegionBase< Tr >::block_range = iterator_range<block_iterator>

Definition at line 621 of file RegionInfo.h.

◆ const_block_iterator

Definition at line 610 of file RegionInfo.h.

◆ const_block_range

Definition at line 622 of file RegionInfo.h.

◆ const_element_iterator

template<class Tr>
using llvm::RegionBase< Tr >::const_element_iterator = df_iterator<const RegionNodeT *, df_iterator_default_set<const RegionNodeT *>, false, GraphTraits<const RegionNodeT *> >

Definition at line 650 of file RegionInfo.h.

◆ const_iterator

template<class Tr>
using llvm::RegionBase< Tr >::const_iterator = typename RegionSet::const_iterator

Definition at line 560 of file RegionInfo.h.

◆ element_iterator

template<class Tr>
using llvm::RegionBase< Tr >::element_iterator = df_iterator<RegionNodeT *, df_iterator_default_set<RegionNodeT *>, false, GraphTraits<RegionNodeT *> >

Definition at line 645 of file RegionInfo.h.

◆ iterator

template<class Tr>
using llvm::RegionBase< Tr >::iterator = typename RegionSet::iterator

Definition at line 559 of file RegionInfo.h.

Member Enumeration Documentation

◆ PrintStyle

template<class Tr>
enum llvm::RegionBase::PrintStyle

PrintStyle - Print region in difference ways.

Enumerator
PrintNone 
PrintBB 
PrintRN 

Definition at line 431 of file RegionInfo.h.

Constructor & Destructor Documentation

◆ RegionBase() [1/2]

template<class Tr>
llvm::RegionBase< Tr >::RegionBase ( BlockT *  Entry,
BlockT *  Exit,
RegionInfoT *  RI,
DomTreeT *  DT,
RegionT Parent = nullptr 
)

Create a new region.

Parameters
EntryThe entry basic block of the region.
ExitThe exit basic block of the region.
RIThe region info object that is managing this region.
DTThe dominator tree of the current function.
ParentThe surrounding region or NULL if this is a top level region.

◆ RegionBase() [2/2]

template<class Tr>
llvm::RegionBase< Tr >::RegionBase ( const RegionBase< Tr > &  )
delete

◆ ~RegionBase()

template<class Tr >
llvm::RegionBase< Tr >::~RegionBase ( )

Delete the Region and all its subregions.

Definition at line 51 of file RegionInfoImpl.h.

Member Function Documentation

◆ addSubRegion()

template<class Tr >
void llvm::RegionBase< Tr >::addSubRegion ( RegionT SubRegion,
bool  moveChildren = false 
)

Add a new subregion to this Region.

Parameters
SubRegionThe new subregion that will be added.
moveChildrenMove the children of this region, that are also contained in SubRegion into SubRegion.

Definition at line 394 of file RegionInfoImpl.h.

◆ begin() [1/2]

template<class Tr>
iterator llvm::RegionBase< Tr >::begin ( )
inline

Definition at line 562 of file RegionInfo.h.

Referenced by getBranchInsertPoint().

◆ begin() [2/2]

template<class Tr>
const_iterator llvm::RegionBase< Tr >::begin ( ) const
inline

Definition at line 565 of file RegionInfo.h.

◆ block_begin() [1/2]

template<class Tr>
block_iterator llvm::RegionBase< Tr >::block_begin ( )
inline

Definition at line 612 of file RegionInfo.h.

◆ block_begin() [2/2]

template<class Tr>
const_block_iterator llvm::RegionBase< Tr >::block_begin ( ) const
inline

Definition at line 616 of file RegionInfo.h.

◆ block_end() [1/2]

template<class Tr>
block_iterator llvm::RegionBase< Tr >::block_end ( )
inline

Definition at line 614 of file RegionInfo.h.

◆ block_end() [2/2]

template<class Tr>
const_block_iterator llvm::RegionBase< Tr >::block_end ( ) const
inline

Definition at line 619 of file RegionInfo.h.

◆ blocks() [1/2]

template<class Tr>
block_range llvm::RegionBase< Tr >::blocks ( )
inline

Returns a range view of the basic blocks in the region.

Definition at line 625 of file RegionInfo.h.

Referenced by llvm::RGPassManager::dumpPassStructure(), and hasOnlyUniformBranches().

◆ blocks() [2/2]

template<class Tr>
const_block_range llvm::RegionBase< Tr >::blocks ( ) const
inline

Returns a range view of the basic blocks in the region.

This is the 'const' version of the range view.

Definition at line 632 of file RegionInfo.h.

◆ clearNodeCache()

template<class Tr >
void llvm::RegionBase< Tr >::clearNodeCache ( )

Clear the cache for BB RegionNodes.

After calling this function the BasicBlock RegionNodes will be stored at different memory locations. RegionNodes obtained before this function is called are therefore not comparable to RegionNodes abtained afterwords.

Definition at line 533 of file RegionInfoImpl.h.

◆ contains() [1/4]

template<class Tr >
bool llvm::RegionBase< Tr >::contains ( const BlockT *  BB) const

Check if the region contains a BasicBlock.

Parameters
BBThe BasicBlock that might be contained in this Region.
Returns
True if the block is contained in the region otherwise false.

Definition at line 105 of file RegionInfoImpl.h.

Referenced by assertBranchOrSelectConditionHoisted(), llvm::createControlHeightReductionLegacyPass(), getBranchInsertPoint(), and SortBlocks().

◆ contains() [2/4]

template<class Tr>
bool llvm::RegionBase< Tr >::contains ( const RegionT SubRegion) const
inline

Check if the region contains another region.

Parameters
SubRegionThe region that might be contained in this Region.
Returns
True if SubRegion is contained in the region otherwise false.

Definition at line 456 of file RegionInfo.h.

◆ contains() [3/4]

template<class Tr>
bool llvm::RegionBase< Tr >::contains ( const InstT *  Inst) const
inline

Check if the region contains an Instruction.

Parameters
InstThe Instruction that might be contained in this region.
Returns
True if the Instruction is contained in the region otherwise false.

Definition at line 471 of file RegionInfo.h.

Referenced by llvm::RegionBase< RegionTraits< Function > >::contains().

◆ contains() [4/4]

template<class Tr >
bool llvm::RegionBase< Tr >::contains ( const LoopT *  L) const

Check if the region contains a loop.

Parameters
LThe loop that might be contained in this region.
Returns
True if the loop is contained in the region otherwise false. In case a NULL pointer is passed to this function the result is false, except for the region that describes the whole function. In that case true is returned.

Definition at line 122 of file RegionInfoImpl.h.

◆ dump()

template<class Tr >
void llvm::RegionBase< Tr >::dump ( ) const

Print the region to stderr.

Definition at line 527 of file RegionInfoImpl.h.

◆ element_begin() [1/2]

template<class Tr >
RegionBase< Tr >::element_iterator llvm::RegionBase< Tr >::element_begin ( )

Definition at line 315 of file RegionInfoImpl.h.

◆ element_begin() [2/2]

template<class Tr >
RegionBase< Tr >::const_element_iterator llvm::RegionBase< Tr >::element_begin ( ) const

Definition at line 326 of file RegionInfoImpl.h.

◆ element_end() [1/2]

template<class Tr >
RegionBase< Tr >::element_iterator llvm::RegionBase< Tr >::element_end ( )

Definition at line 320 of file RegionInfoImpl.h.

◆ element_end() [2/2]

template<class Tr >
RegionBase< Tr >::const_element_iterator llvm::RegionBase< Tr >::element_end ( ) const

Definition at line 333 of file RegionInfoImpl.h.

◆ elements() [1/2]

template<class Tr>
iterator_range<element_iterator> llvm::RegionBase< Tr >::elements ( )
inline

Definition at line 654 of file RegionInfo.h.

Referenced by getBranchInsertPoint(), and hasOnlyUniformBranches().

◆ elements() [2/2]

template<class Tr>
iterator_range<const_element_iterator> llvm::RegionBase< Tr >::elements ( ) const
inline

Definition at line 660 of file RegionInfo.h.

◆ end() [1/2]

template<class Tr>
iterator llvm::RegionBase< Tr >::end ( )
inline

Definition at line 563 of file RegionInfo.h.

Referenced by getBranchInsertPoint().

◆ end() [2/2]

template<class Tr>
const_iterator llvm::RegionBase< Tr >::end ( ) const
inline

Definition at line 566 of file RegionInfo.h.

◆ getBBNode()

template<class Tr >
Tr::RegionNodeT * llvm::RegionBase< Tr >::getBBNode ( BlockT *  BB) const

Get the BasicBlock RegionNode for a BasicBlock.

Parameters
BBThe BasicBlock for which the RegionNode is requested.
Returns
The RegionNode representing the BB.

Definition at line 360 of file RegionInfoImpl.h.

◆ getDepth()

template<class Tr >
unsigned llvm::RegionBase< Tr >::getDepth ( ) const

Get the nesting level of this Region.

An toplevel Region has depth 0.

Returns
The depth of the region.

Definition at line 450 of file RegionInfoImpl.h.

Referenced by llvm::DOTGraphTraits< RegionInfo * >::printRegionCluster().

◆ getEnteringBlock()

template<class Tr >
RegionBase< Tr >::BlockT * llvm::RegionBase< Tr >::getEnteringBlock ( ) const

Return the first block of this region's single entry edge, if existing.

Returns
The BasicBlock starting this region's single entry edge, else NULL.

Definition at line 164 of file RegionInfoImpl.h.

◆ getEntry()

template<class Tr>
BlockT* llvm::RegionBase< Tr >::getEntry ( ) const
inline

◆ getExit()

template<class Tr>
BlockT* llvm::RegionBase< Tr >::getExit ( ) const
inline

Get the exit BasicBlock of the Region.

Returns
The exit BasicBlock of the Region, NULL if this is the TopLevel Region.

Definition at line 361 of file RegionInfo.h.

Referenced by assertBranchOrSelectConditionHoisted(), checkBiasedBranch(), getBranchInsertPoint(), and llvm::VPBlockBase::getExitBasicBlock().

◆ getExitingBlock()

template<class Tr >
RegionBase< Tr >::BlockT * llvm::RegionBase< Tr >::getExitingBlock ( ) const

Return the first block of this region's single exit edge, if existing.

Returns
The BasicBlock starting this region's single exit edge, else NULL.

Definition at line 205 of file RegionInfoImpl.h.

◆ getExitingBlocks()

template<class Tr >
bool llvm::RegionBase< Tr >::getExitingBlocks ( SmallVectorImpl< BlockT *> &  Exitings) const

Collect all blocks of this region's single exit edge, if existing.

Returns
True if this region contains all the predecessors of the exit.

Definition at line 182 of file RegionInfoImpl.h.

◆ getExpandedRegion()

template<class Tr >
Tr::RegionT * llvm::RegionBase< Tr >::getExpandedRegion ( ) const

Return a new (non-canonical) region, that is obtained by joining this region with its predecessors.

Returns
A region also starting at getEntry(), but reaching to the next basic block that forms with getEntry() a (non-canonical) region. NULL if such a basic block does not exist.

Definition at line 460 of file RegionInfoImpl.h.

◆ getNameStr()

template<class Tr >
std::string llvm::RegionBase< Tr >::getNameStr ( ) const

Returns the name of the Region.

Returns
The Name of the Region.

Definition at line 231 of file RegionInfoImpl.h.

Referenced by getBranchInsertPoint(), getSelectsInScope(), and llvm::RGPassManager::runOnFunction().

◆ getNode() [1/2]

template<class Tr>
RegionNodeT* llvm::RegionBase< Tr >::getNode ( ) const
inline

Get the RegionNode representing the current Region.

Returns
The RegionNode representing the current Region.

Definition at line 372 of file RegionInfo.h.

◆ getNode() [2/2]

template<class Tr >
Tr::RegionNodeT * llvm::RegionBase< Tr >::getNode ( BlockT *  BB) const

Get the RegionNode for a BasicBlock.

Parameters
BBThe BasicBlock at which the RegionNode should start.
Returns
If available, the RegionNode that represents the subregion starting at BB. If no subregion starts at BB, the RegionNode representing BB.

Definition at line 376 of file RegionInfoImpl.h.

◆ getParent()

template<class Tr>
RegionT* llvm::RegionBase< Tr >::getParent ( ) const
inline

Get the parent of the Region.

Returns
The parent of the Region or NULL if this is a top level Region.

Definition at line 366 of file RegionInfo.h.

Referenced by createBBSelectReg(), and llvm::createControlHeightReductionLegacyPass().

◆ getRegionInfo()

template<class Tr>
RegionInfoT* llvm::RegionBase< Tr >::getRegionInfo ( ) const
inline

Return the RegionInfo object, that belongs to this Region.

Definition at line 428 of file RegionInfo.h.

◆ getSubRegionNode()

template<class Tr >
Tr::RegionT * llvm::RegionBase< Tr >::getSubRegionNode ( BlockT *  BB) const

Get the subregion that starts at a BasicBlock.

Parameters
BBThe BasicBlock the subregion should start.
Returns
The Subregion if available, otherwise NULL.

Definition at line 339 of file RegionInfoImpl.h.

◆ isSimple()

template<class Tr >
bool llvm::RegionBase< Tr >::isSimple ( ) const

Is this a simple region?

A region is simple if it has exactly one exit and one entry edge.

Returns
True if the Region is simple.

Definition at line 226 of file RegionInfoImpl.h.

Referenced by llvm::DOTGraphTraits< RegionInfo * >::printRegionCluster(), llvm::MachineRegionInfo::updateStatistics(), and llvm::RegionInfo::updateStatistics().

◆ isTopLevelRegion()

template<class Tr>
bool llvm::RegionBase< Tr >::isTopLevelRegion ( ) const
inline

Check if a Region is the TopLevel region.

The toplevel region represents the whole function.

Definition at line 387 of file RegionInfo.h.

Referenced by getBranchInsertPoint(), and hasOnlyUniformBranches().

◆ operator=()

template<class Tr>
RegionBase& llvm::RegionBase< Tr >::operator= ( const RegionBase< Tr > &  )
delete

◆ outermostLoopInRegion() [1/2]

template<class Tr >
Tr::LoopT * llvm::RegionBase< Tr >::outermostLoopInRegion ( LoopT *  L) const

Get the outermost loop in the region that contains a loop.

Find for a Loop L the outermost loop OuterL that is a parent loop of L and is itself contained in the region.

Parameters
LThe loop the lookup is started.
Returns
The outermost loop in the region, NULL if such a loop does not exist or if the region describes the whole function.

Definition at line 144 of file RegionInfoImpl.h.

◆ outermostLoopInRegion() [2/2]

template<class Tr >
Tr::LoopT * llvm::RegionBase< Tr >::outermostLoopInRegion ( LoopInfoT *  LI,
BlockT *  BB 
) const

Get the outermost loop in the region that contains a basic block.

Find for a basic block BB the outermost loop L that contains BB and is itself contained in the region.

Parameters
LIA pointer to a LoopInfo analysis.
BBThe basic block surrounded by the loop.
Returns
The outermost loop in the region, NULL if such a loop does not exist or if the region describes the whole function.

Definition at line 156 of file RegionInfoImpl.h.

◆ print()

template<class Tr >
void llvm::RegionBase< Tr >::print ( raw_ostream OS,
bool  printTree = true,
unsigned  level = 0,
PrintStyle  Style = PrintNone 
) const

Print the region.

Parameters
OSThe output stream the Region is printed to.
printTreePrint also the tree of subregions.
levelThe indentation level used for printing.

Definition at line 491 of file RegionInfoImpl.h.

◆ removeSubRegion()

template<class Tr >
Tr::RegionT * llvm::RegionBase< Tr >::removeSubRegion ( RegionT SubRegion)

Remove a subregion from this Region.

The subregion is not deleted, as it will probably be inserted into another region.

Parameters
SubRegionThe SubRegion that will be removed.

Definition at line 437 of file RegionInfoImpl.h.

◆ replaceEntry()

template<class Tr >
void llvm::RegionBase< Tr >::replaceEntry ( BlockT *  BB)

Replace the entry basic block of the region with the new basic block.

Parameters
BBThe new entry basic block of the region.

Definition at line 58 of file RegionInfoImpl.h.

◆ replaceEntryRecursive()

template<class Tr >
void llvm::RegionBase< Tr >::replaceEntryRecursive ( BlockT *  NewEntry)

Recursively replace the entry basic block of the region.

This function replaces the entry basic block with a new basic block. It also updates all child regions that have the same entry basic block as this region.

Parameters
NewEntryThe new entry basic block.

Definition at line 69 of file RegionInfoImpl.h.

◆ replaceExit()

template<class Tr >
void llvm::RegionBase< Tr >::replaceExit ( BlockT *  BB)

Replace the exit basic block of the region with the new basic block.

Parameters
BBThe new exit basic block of the region.

Definition at line 63 of file RegionInfoImpl.h.

◆ replaceExitRecursive()

template<class Tr >
void llvm::RegionBase< Tr >::replaceExitRecursive ( BlockT *  NewExit)

Recursively replace the exit basic block of the region.

This function replaces the exit basic block with a new basic block. It also updates all child regions that have the same exit basic block as this region.

Parameters
NewExitThe new exit basic block.

Definition at line 87 of file RegionInfoImpl.h.

◆ transferChildrenTo()

template<class Tr >
void llvm::RegionBase< Tr >::transferChildrenTo ( RegionT To)

Move all direct child nodes of this Region to another Region.

Parameters
ToThe Region the child nodes will be transferred to.

Definition at line 385 of file RegionInfoImpl.h.

◆ verifyRegion()

template<class Tr >
void llvm::RegionBase< Tr >::verifyRegion ( ) const

Verify if the region is a correct region.

Check if this is a correctly build Region. This is an expensive check, as the complete CFG of the Region will be walked.

Definition at line 295 of file RegionInfoImpl.h.

Referenced by llvm::RGPassManager::runOnFunction().

Friends And Related Function Documentation

◆ RegionInfoBase< Tr >

template<class Tr>
friend class RegionInfoBase< Tr >
friend

Definition at line 257 of file RegionInfo.h.


The documentation for this class was generated from the following files: