LLVM  3.7.0
Public Member Functions | Static Public Attributes | Friends | List of all members
llvm::RegionInfoBase< RegionTr > Class Template Referenceabstract

Analysis that detects all canonical Regions. More...

#include <RegionInfo.h>

Inheritance diagram for llvm::RegionInfoBase< RegionTr >:
[legend]
Collaboration diagram for llvm::RegionInfoBase< RegionTr >:
[legend]

Public Member Functions

void print (raw_ostream &OS) const
 
void dump () const
 
void releaseMemory ()
 
RegionT * getRegionFor (BlockT *BB) const
 Get the smallest region that contains a BasicBlock. More...
 
void setRegionFor (BlockT *BB, RegionT *R)
 Set the smallest region that surrounds a basic block. More...
 
RegionT * operator[] (BlockT *BB) const
 A shortcut for getRegionFor(). More...
 
BlockT * getMaxRegionExit (BlockT *BB) const
 Return the exit of the maximal refined region, that starts at a BasicBlock. More...
 
RegionT * getCommonRegion (RegionT *A, RegionT *B) const
 Find the smallest region that contains two regions. More...
 
RegionT * getCommonRegion (BlockT *A, BlockT *B) const
 Find the smallest region that contains two basic blocks. More...
 
RegionT * getCommonRegion (SmallVectorImpl< RegionT * > &Regions) const
 Find the smallest region that contains a set of regions. More...
 
RegionT * getCommonRegion (SmallVectorImpl< BlockT * > &BBs) const
 Find the smallest region that contains a set of basic blocks. More...
 
RegionT * getTopLevelRegion () const
 
void splitBlock (BlockT *NewBB, BlockT *OldBB)
 Update RegionInfo after a basic block was split. More...
 
void clearNodeCache ()
 Clear the Node Cache for all Regions. More...
 
void verifyAnalysis () const
 

Static Public Attributes

static bool VerifyRegionInfo = false
 
static RegionT::PrintStyle printStyle
 

Friends

class RegionInfo
 
class MachineRegionInfo
 

Detailed Description

template<class RegionTr>
class llvm::RegionInfoBase< RegionTr >

Analysis that detects all canonical Regions.

The RegionInfo pass detects all canonical regions in a function. The Regions are connected using the parent relation. This builds a Program Structure Tree.

Definition at line 75 of file RegionInfo.h.

Member Function Documentation

template<class RegionTr>
void llvm::RegionInfoBase< RegionTr >::clearNodeCache ( )
inline

Clear the Node Cache for all Regions.

See Also
Region::clearNodeCache()

Definition at line 808 of file RegionInfo.h.

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

template<class Tr >
void llvm::RegionInfoBase< Tr >::dump ( ) const
template<class Tr >
Tr::RegionT * llvm::RegionInfoBase< Tr >::getCommonRegion ( RegionT *  A,
RegionT *  B 
) const

Find the smallest region that contains two regions.

Parameters
AThe first region.
BThe second region.
Returns
The smallest region containing A and B.

Definition at line 852 of file RegionInfoImpl.h.

Referenced by llvm::RegionInfoBase< RegionTraits< Function > >::getCommonRegion().

template<class RegionTr>
RegionT* llvm::RegionInfoBase< RegionTr >::getCommonRegion ( BlockT *  A,
BlockT *  B 
) const
inline

Find the smallest region that contains two basic blocks.

Parameters
AThe first basic block.
BThe second basic block.
Returns
The smallest region that contains A and B.

Definition at line 781 of file RegionInfo.h.

template<class Tr >
Tr::RegionT * llvm::RegionInfoBase< Tr >::getCommonRegion ( SmallVectorImpl< RegionT * > &  Regions) const

Find the smallest region that contains a set of regions.

Parameters
RegionsA vector of regions.
Returns
The smallest region that contains all regions in Regions.

Definition at line 867 of file RegionInfoImpl.h.

References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back().

template<class Tr >
Tr::RegionT * llvm::RegionInfoBase< Tr >::getCommonRegion ( SmallVectorImpl< BlockT * > &  BBs) const

Find the smallest region that contains a set of basic blocks.

Parameters
BBsA vector of basic blocks.
Returns
The smallest region that contains all basic blocks in BBS.

Definition at line 879 of file RegionInfoImpl.h.

References llvm::SmallVectorTemplateCommon< T >::back(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back().

template<class Tr >
RegionInfoBase< Tr >::BlockT * llvm::RegionInfoBase< Tr >::getMaxRegionExit ( BlockT *  BB) const

Return the exit of the maximal refined region, that starts at a BasicBlock.

Parameters
BBThe BasicBlock the refined region starts.

Definition at line 811 of file RegionInfoImpl.h.

template<class Tr >
Tr::RegionT * llvm::RegionInfoBase< Tr >::getRegionFor ( BlockT *  BB) const

Get the smallest region that contains a BasicBlock.

Parameters
BBThe basic block.
Returns
The smallest region, that contains BB or NULL, if there is no region containing BB.

Definition at line 794 of file RegionInfoImpl.h.

References I.

Referenced by llvm::RegionInfoBase< RegionTraits< Function > >::getCommonRegion(), llvm::DOTGraphTraits< RegionInfoPass * >::getEdgeAttributes(), and llvm::DOTGraphTraits< RegionInfoPass * >::printRegionCluster().

template<class RegionTr>
RegionT* llvm::RegionInfoBase< RegionTr >::getTopLevelRegion ( ) const
inline
template<class Tr >
Tr::RegionT * llvm::RegionInfoBase< Tr >::operator[] ( BlockT *  BB) const

A shortcut for getRegionFor().

Parameters
BBThe basic block.
Returns
The smallest region, that contains BB or NULL, if there is no region containing BB.

Definition at line 805 of file RegionInfoImpl.h.

template<class Tr >
void llvm::RegionInfoBase< Tr >::print ( raw_ostream OS) const
template<class Tr >
void llvm::RegionInfoBase< Tr >::releaseMemory ( )
template<class Tr >
void llvm::RegionInfoBase< Tr >::setRegionFor ( BlockT *  BB,
RegionT *  R 
)

Set the smallest region that surrounds a basic block.

Parameters
BBThe basic block surrounded by a region.
RThe smallest region that surrounds BB.

Definition at line 800 of file RegionInfoImpl.h.

template<class Tr >
void llvm::RegionInfoBase< Tr >::splitBlock ( BlockT *  NewBB,
BlockT *  OldBB 
)

Update RegionInfo after a basic block was split.

Parameters
NewBBThe basic block that was created before OldBB.
OldBBThe old basic block.

Definition at line 890 of file RegionInfoImpl.h.

template<class Tr >
void llvm::RegionInfoBase< Tr >::verifyAnalysis ( ) const

Friends And Related Function Documentation

template<class RegionTr>
friend class MachineRegionInfo
friend

Definition at line 669 of file RegionInfo.h.

template<class RegionTr>
friend class RegionInfo
friend

Definition at line 668 of file RegionInfo.h.

Member Data Documentation

template<class RegionTr>
Tr::RegionT::PrintStyle llvm::RegionInfoBase< Tr >::printStyle
static
Initial value:
=
RegionBase<Tr>::PrintNone

Definition at line 734 of file RegionInfo.h.

template<class RegionTr>
bool llvm::RegionInfoBase< Tr >::VerifyRegionInfo = false
static

Definition at line 733 of file RegionInfo.h.


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