LLVM  4.0.0
Public Member Functions | List of all members
llvm::Region Class Reference

#include <RegionInfo.h>

Inheritance diagram for llvm::Region:
[legend]
Collaboration diagram for llvm::Region:
[legend]

Public Member Functions

 Region (BasicBlock *Entry, BasicBlock *Exit, RegionInfo *RI, DominatorTree *DT, Region *Parent=nullptr)
 
 ~Region ()
 
bool operator== (const RegionNode &RN) const
 
- Public Member Functions inherited from llvm::RegionBase< RegionTraits< Function > >
 RegionBase (BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent=nullptr)
 Create a new region. More...
 
 ~RegionBase ()
 Delete the Region and all its subregions. More...
 
BlockTgetEntry () 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...
 
BlockTgetExit () 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...
 
RegionNodeT * getNode (BlockT *BB) const
 Get the RegionNode for a BasicBlock. 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...
 
BlockTgetEnteringBlock () const
 Return the first block of this region's single entry edge, if existing. More...
 
BlockTgetExitingBlock () const
 Return the first block 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 * 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...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
block_iterator block_begin ()
 
const_block_iterator block_begin () const
 
block_iterator block_end ()
 
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_iterator element_begin ()
 
const_element_iterator element_begin () const
 
element_iterator element_end ()
 
const_element_iterator element_end () const
 
iterator_range< element_iteratorelements ()
 
iterator_range
< const_element_iterator
elements () const
 
- Public Member Functions inherited from llvm::RegionNodeBase< Tr >
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
 

Additional Inherited Members

- Public Types inherited from llvm::RegionBase< RegionTraits< Function > >
enum  PrintStyle
 PrintStyle - Print region in difference ways. More...
 
typedef RegionSet::iterator iterator
 
typedef RegionSet::const_iterator const_iterator
 
typedef block_iterator_wrapper
< false
block_iterator
 
typedef block_iterator_wrapper
< true
const_block_iterator
 
typedef iterator_range
< block_iterator
block_range
 
typedef iterator_range
< const_block_iterator
const_block_range
 
typedef df_iterator
< RegionNodeT
*, df_iterator_default_set
< RegionNodeT * >, false,
GraphTraits< RegionNodeT * > > 
element_iterator
 
typedef df_iterator< const
RegionNodeT
*, df_iterator_default_set
< const RegionNodeT * >, false,
GraphTraits< const RegionNodeT * > > 
const_element_iterator
 
- Public Types inherited from llvm::RegionNodeBase< Tr >
typedef Tr::BlockT BlockT
 
typedef Tr::RegionT RegionT
 
- Protected Member Functions inherited from llvm::RegionNodeBase< Tr >
 RegionNodeBase (RegionT *Parent, BlockT *Entry, bool isSubRegion=false)
 Create a RegionNode. More...
 

Detailed Description

Definition at line 863 of file RegionInfo.h.

Constructor & Destructor Documentation

Region::Region ( BasicBlock Entry,
BasicBlock Exit,
RegionInfo RI,
DominatorTree DT,
Region Parent = nullptr 
)

Definition at line 64 of file RegionInfo.cpp.

Region::~Region ( )

Definition at line 71 of file RegionInfo.cpp.

Member Function Documentation

bool llvm::Region::operator== ( const RegionNode RN) const
inline

Definition at line 869 of file RegionInfo.h.


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