LLVM 19.0.0git
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::RegionNodeBase< Tr > Class Template Reference

A RegionNode represents a subregion or a BasicBlock that is part of a Region. More...

#include "llvm/Analysis/RegionInfo.h"

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

Public Types

using BlockT = typename Tr::BlockT
 
using RegionT = typename Tr::RegionT
 

Public Member Functions

 RegionNodeBase (const RegionNodeBase &)=delete
 
RegionNodeBaseoperator= (const RegionNodeBase &)=delete
 
RegionTgetParent () const
 Get the parent Region of this RegionNode.
 
BlockTgetEntry () const
 Get the entry BasicBlock of this RegionNode.
 
template<class T >
TgetNodeAs () const
 Get the content of this RegionNode.
 
bool isSubRegion () const
 Is this RegionNode a subregion?
 
BasicBlockgetNodeAs () const
 
RegiongetNodeAs () const
 
MachineBasicBlockgetNodeAs () const
 
MachineRegiongetNodeAs () const
 

Protected Member Functions

 RegionNodeBase (RegionT *Parent, BlockT *Entry, bool isSubRegion=false)
 Create a RegionNode.
 

Friends

class RegionBase< Tr >
 

Detailed Description

template<class Tr>
class llvm::RegionNodeBase< Tr >

A RegionNode represents a subregion or a BasicBlock that is part of a Region.

Definition at line 117 of file RegionInfo.h.

Member Typedef Documentation

◆ BlockT

template<class Tr >
using llvm::RegionNodeBase< Tr >::BlockT = typename Tr::BlockT

Definition at line 121 of file RegionInfo.h.

◆ RegionT

template<class Tr >
using llvm::RegionNodeBase< Tr >::RegionT = typename Tr::RegionT

Definition at line 122 of file RegionInfo.h.

Constructor & Destructor Documentation

◆ RegionNodeBase() [1/2]

template<class Tr >
llvm::RegionNodeBase< Tr >::RegionNodeBase ( RegionT Parent,
BlockT Entry,
bool  isSubRegion = false 
)
inlineprotected

Create a RegionNode.

Parameters
ParentThe parent of this RegionNode.
EntryThe entry BasicBlock of the RegionNode. If this RegionNode represents a BasicBlock, this is the BasicBlock itself. If it represents a subregion, this is the entry BasicBlock of the subregion.
isSubRegionIf this RegionNode represents a SubRegion.

Definition at line 150 of file RegionInfo.h.

◆ RegionNodeBase() [2/2]

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

Member Function Documentation

◆ getEntry()

template<class Tr >
BlockT * llvm::RegionNodeBase< Tr >::getEntry ( ) const
inline

Get the entry BasicBlock of this RegionNode.

If this RegionNode represents a BasicBlock this is just the BasicBlock itself, otherwise we return the entry BasicBlock of the Subregion

Returns
The entry BasicBlock of this RegionNode.

Definition at line 174 of file RegionInfo.h.

References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer().

Referenced by llvm::RegionBase< Tr >::getEntry().

◆ getNodeAs() [1/5]

template<class Tr >
template<class T >
T * llvm::RegionNodeBase< Tr >::getNodeAs ( ) const
inline

Get the content of this RegionNode.

This can be either a BasicBlock or a subregion. Before calling getNodeAs() check the type of the content with the isSubRegion() function call.

Returns
The content of this RegionNode.

Referenced by llvm::DOTGraphTraits< RegionInfo * >::getEdgeAttributes().

◆ getNodeAs() [2/5]

BasicBlock * llvm::RegionNodeBase< RegionTraits< Function > >::getNodeAs< BasicBlock > ( ) const
inline

Definition at line 998 of file RegionInfo.h.

References assert().

◆ getNodeAs() [3/5]

Region * llvm::RegionNodeBase< RegionTraits< Function > >::getNodeAs< Region > ( ) const
inline

Definition at line 1006 of file RegionInfo.h.

References assert().

◆ getNodeAs() [4/5]

Definition at line 111 of file MachineRegionInfo.h.

References assert().

◆ getNodeAs() [5/5]

Definition at line 120 of file MachineRegionInfo.h.

References assert().

◆ getParent()

template<class Tr >
RegionT * llvm::RegionNodeBase< Tr >::getParent ( ) const
inline

Get the parent Region of this RegionNode.

The parent Region is the Region this RegionNode belongs to. If for example a BasicBlock is element of two Regions, there exist two RegionNodes for this BasicBlock. Each with the getParent() function pointing to the Region this RegionNode belongs to.

Returns
Get the parent Region of this RegionNode.

Definition at line 166 of file RegionInfo.h.

Referenced by llvm::RegionBase< Tr >::getParent().

◆ isSubRegion()

template<class Tr >
bool llvm::RegionNodeBase< Tr >::isSubRegion ( ) const
inline

Is this RegionNode a subregion?

Returns
True if it contains a subregion. False if it contains a BasicBlock.

Definition at line 188 of file RegionInfo.h.

References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt().

Referenced by llvm::DOTGraphTraits< RegionInfo * >::getEdgeAttributes().

◆ operator=()

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

Friends And Related Function Documentation

◆ RegionBase< Tr >

template<class Tr >
friend class RegionBase< Tr >
friend

Definition at line 99 of file RegionInfo.h.


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