LLVM API Documentation

Public Types | Public Member Functions | Protected Member Functions | Friends
llvm::RegionNodeBase< Tr > Class Template Reference

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

#include <RegionInfo.h>

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

List of all members.

Public Types

typedef Tr::BlockT BlockT
typedef Tr::RegionT RegionT

Public Member Functions

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?
template<>
BasicBlockgetNodeAs () const
template<>
RegiongetNodeAs () const
template<>
MachineBasicBlockgetNodeAs () const
template<>
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 110 of file RegionInfo.h.


Member Typedef Documentation

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

Definition at line 114 of file RegionInfo.h.

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

Definition at line 115 of file RegionInfo.h.


Constructor & Destructor Documentation

template<class Tr>
llvm::RegionNodeBase< Tr >::RegionNodeBase ( RegionT Parent,
BlockT Entry,
bool  isSubRegion = false 
) [inline, protected]

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


Member Function Documentation

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.

Reimplemented in llvm::RegionBase< Tr >, llvm::RegionBase< RegionTraits< MachineFunction > >, and llvm::RegionBase< RegionTraits< Function > >.

Definition at line 167 of file RegionInfo.h.

Definition at line 125 of file MachineRegionInfo.h.

References getEntry().

Definition at line 132 of file MachineRegionInfo.h.

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 buildExtractionBlockSet(), llvm::DOTGraphTraits< RegionInfoPass * >::getEdgeAttributes(), and llvm::DOTGraphTraits< RegionNode * >::getNodeLabel().

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

Definition at line 877 of file RegionInfo.h.

References getEntry().

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

Definition at line 885 of file RegionInfo.h.

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.

Reimplemented in llvm::RegionBase< Tr >, llvm::RegionBase< RegionTraits< MachineFunction > >, and llvm::RegionBase< RegionTraits< Function > >.

Definition at line 159 of file RegionInfo.h.

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

Referenced by buildExtractionBlockSet(), llvm::DOTGraphTraits< RegionInfoPass * >::getEdgeAttributes(), llvm::DOTGraphTraits< RegionNode * >::getNodeLabel(), and llvm::operator<<().


Friends And Related Function Documentation

template<class Tr>
friend class RegionBase< Tr > [friend]

Definition at line 111 of file RegionInfo.h.


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