LLVM API Documentation

Public Member Functions | Static Public Attributes | Friends
llvm::RegionInfoBase< Tr > Class Template Reference

Analysis that detects all canonical Regions. More...

#include <RegionInfo.h>

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

List of all members.

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

Static Public Attributes

static bool VerifyRegionInfo = false
static RegionT::PrintStyle printStyle

Friends

class RegionInfo
class MachineRegionInfo

Detailed Description

template<class Tr>
class llvm::RegionInfoBase< Tr >

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 652 of file RegionInfo.h.


Member Function Documentation

template<class Tr>
void llvm::RegionInfoBase< Tr >::clearNodeCache ( ) [inline]

Clear the Node Cache for all Regions.

See also:
Region::clearNodeCache()

Definition at line 804 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 854 of file RegionInfoImpl.h.

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

template<class Tr>
RegionT* llvm::RegionInfoBase< Tr >::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 777 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 869 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 881 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 813 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 796 of file RegionInfoImpl.h.

References I.

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

template<class Tr>
RegionT* llvm::RegionInfoBase< Tr >::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 807 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 802 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 892 of file RegionInfoImpl.h.

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

Friends And Related Function Documentation

template<class Tr>
friend class MachineRegionInfo [friend]

Definition at line 667 of file RegionInfo.h.

template<class Tr>
friend class RegionInfo [friend]

Definition at line 666 of file RegionInfo.h.


Member Data Documentation

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

Definition at line 732 of file RegionInfo.h.

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

Definition at line 731 of file RegionInfo.h.


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