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

Analysis that detects all canonical Regions. More...

#include "llvm/Analysis/RegionInfo.h"

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

Public Member Functions

 RegionInfoBase (const RegionInfoBase &)=delete
 
RegionInfoBase & operator= (const RegionInfoBase &)=delete
 
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 clearNodeCache ()
 Clear the Node Cache for all Regions. More...
 
void verifyAnalysis () const
 

Static Public Attributes

static bool VerifyRegionInfo = false
 
static RegionT::PrintStyle printStyle
 

Protected Member Functions

template<typename TheRegionT >
void updateRegionTree (RegionInfoT &RI, TheRegionT *R)
 Update refences to a RegionInfoT held by the RegionT managed here. More...
 

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

Constructor & Destructor Documentation

template<class RegionTr>
llvm::RegionInfoBase< RegionTr >::RegionInfoBase ( const RegionInfoBase< RegionTr > &  )
delete

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 868 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 853 of file RegionInfoImpl.h.

References assert(), and B.

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 847 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 868 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 880 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.

References llvm::make_range().

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< RegionInfo * >::getEdgeAttributes(), and llvm::DOTGraphTraits< RegionInfo * >::printRegionCluster().

template<class RegionTr>
RegionT* llvm::RegionInfoBase< RegionTr >::getTopLevelRegion ( ) const
inline
template<class RegionTr>
RegionInfoBase& llvm::RegionInfoBase< RegionTr >::operator= ( const RegionInfoBase< RegionTr > &  )
delete
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 RegionTr>
template<typename TheRegionT >
void llvm::RegionInfoBase< RegionTr >::updateRegionTree ( RegionInfoT &  RI,
TheRegionT *  R 
)
inlineprotected

Update refences to a RegionInfoT held by the RegionT managed here.

This is a post-move helper. Regions hold references to the owning RegionInfo object. After a move these need to be fixed.

Definition at line 728 of file RegionInfo.h.

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

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

Friends And Related Function Documentation

template<class RegionTr>
friend class MachineRegionInfo
friend

Definition at line 673 of file RegionInfo.h.

template<class RegionTr>
friend class RegionInfo
friend

Definition at line 672 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 800 of file RegionInfo.h.

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

Definition at line 799 of file RegionInfo.h.


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