LLVM 20.0.0git
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]

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.
 
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 clearNodeCache ()
 Clear the Node Cache for all Regions.
 
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.
 

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

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

◆ dump()

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

◆ getCommonRegion() [1/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 848 of file RegionInfo.h.

References A, B, llvm::RegionInfoBase< Tr >::getCommonRegion(), and llvm::RegionInfoBase< Tr >::getRegionFor().

◆ getCommonRegion() [2/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 842 of file RegionInfoImpl.h.

References A, assert(), and B.

Referenced by llvm::RegionInfoBase< Tr >::getCommonRegion().

◆ getCommonRegion() [3/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 868 of file RegionInfoImpl.h.

References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorTemplateBase< T, bool >::pop_back().

◆ getCommonRegion() [4/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 857 of file RegionInfoImpl.h.

References llvm::SmallVectorImpl< T >::pop_back_val().

◆ 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 802 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 786 of file RegionInfoImpl.h.

Referenced by llvm::RegionInfoBase< Tr >::getCommonRegion(), 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 796 of file RegionInfoImpl.h.

◆ print()

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

Definition at line 753 of file RegionInfoImpl.h.

References OS.

Referenced by llvm::RegionInfoPass::print(), and llvm::MachineRegionInfoPass::print().

◆ 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 791 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 729 of file RegionInfo.h.

References llvm::RegionInfoBase< Tr >::updateRegionTree().

Referenced by llvm::RegionInfoBase< Tr >::updateRegionTree().

◆ verifyAnalysis()

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

Friends And Related Function Documentation

◆ MachineRegionInfo

template<class Tr >
friend class MachineRegionInfo
friend

Definition at line 674 of file RegionInfo.h.

◆ RegionInfo

template<class Tr >
friend class RegionInfo
friend

Definition at line 673 of file RegionInfo.h.

Member Data Documentation

◆ printStyle

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

Definition at line 801 of file RegionInfo.h.

◆ VerifyRegionInfo

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

Definition at line 800 of file RegionInfo.h.


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