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

Analysis that detects all canonical Regions. More...

#include "llvm/Analysis/RegionInfo.h"

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

Public Member Functions

 RegionInfoBase (const RegionInfoBase &)=delete
 
RegionInfoBaseoperator= (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 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 69 of file RegionInfo.h.

Constructor & Destructor Documentation

◆ RegionInfoBase()

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

Member Function Documentation

◆ clearNodeCache()

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

Clear the Node Cache for all Regions.

See also
Region::clearNodeCache()

Definition at line 873 of file RegionInfo.h.

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

◆ dump()

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

◆ getCommonRegion() [1/4]

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

◆ getCommonRegion() [2/4]

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

◆ getCommonRegion() [3/4]

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

◆ getCommonRegion() [4/4]

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

◆ getMaxRegionExit()

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

◆ getRegionFor()

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

Referenced by createBBSelectReg(), llvm::DOTGraphTraits< RegionInfo * >::getEdgeAttributes(), and llvm::DOTGraphTraits< RegionInfo * >::printRegionCluster().

◆ getTopLevelRegion()

template<class Tr>
RegionT* llvm::RegionInfoBase< Tr >::getTopLevelRegion ( ) const
inline

◆ operator=()

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

◆ operator[]()

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

◆ print()

template<class Tr >
void llvm::RegionInfoBase< Tr >::print ( raw_ostream OS) const

◆ releaseMemory()

template<class Tr >
void llvm::RegionInfoBase< Tr >::releaseMemory ( )

◆ setRegionFor()

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

◆ updateRegionTree()

template<class Tr>
template<typename TheRegionT >
void llvm::RegionInfoBase< Tr >::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 733 of file RegionInfo.h.

◆ verifyAnalysis()

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

Friends And Related Function Documentation

◆ MachineRegionInfo

template<class Tr>
friend class MachineRegionInfo
friend

Definition at line 678 of file RegionInfo.h.

◆ RegionInfo

template<class Tr>
friend class RegionInfo
friend

Definition at line 677 of file RegionInfo.h.

Member Data Documentation

◆ printStyle

template<class Tr>
Tr::RegionT::PrintStyle llvm::RegionInfoBase< Tr >::printStyle
static
Initial value:

Definition at line 805 of file RegionInfo.h.

◆ VerifyRegionInfo

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

Definition at line 804 of file RegionInfo.h.


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