LLVM API Documentation
A RegionNode represents a subregion or a BasicBlock that is part of a Region. More...
#include <RegionInfo.h>
Public Member Functions | |
RegionNode (Region *Parent, BasicBlock *Entry, bool isSubRegion=0) | |
Create a RegionNode. More... | |
Region * | getParent () const |
Get the parent Region of this RegionNode. More... | |
BasicBlock * | getEntry () const |
Get the entry BasicBlock of this RegionNode. More... | |
template<class T > | |
T * | getNodeAs () const |
Get the content of this RegionNode. More... | |
bool | isSubRegion () const |
Is this RegionNode a subregion? More... | |
template<> | |
BasicBlock * | getNodeAs () const |
template<> | |
Region * | getNodeAs () const |
Protected Attributes | |
PointerIntPair< BasicBlock *, 1, bool > | entry |
Region * | parent |
The parent Region of this RegionNode. More... | |
A RegionNode represents a subregion or a BasicBlock that is part of a Region.
Definition at line 56 of file RegionInfo.h.
|
inline |
Create a RegionNode.
Parent | The parent of this RegionNode. |
Entry | The 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. |
isSubRegion | If this RegionNode represents a SubRegion. |
Definition at line 86 of file RegionInfo.h.
|
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
Definition at line 105 of file RegionInfo.h.
References entry, and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer().
Referenced by llvm::Region::getEntry().
|
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.
Referenced by buildExtractionBlockSet(), llvm::DOTGraphTraits< RegionInfo * >::getEdgeAttributes(), llvm::DOTGraphTraits< RegionNode * >::getNodeLabel(), and llvm::operator<<().
|
inline |
Definition at line 129 of file RegionInfo.h.
|
inline |
Definition at line 135 of file RegionInfo.h.
|
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.
Definition at line 97 of file RegionInfo.h.
References parent.
Referenced by llvm::Region::getParent().
|
inline |
Is this RegionNode a subregion?
Definition at line 120 of file RegionInfo.h.
References entry, and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getInt().
Referenced by buildExtractionBlockSet(), llvm::DOTGraphTraits< RegionInfo * >::getEdgeAttributes(), llvm::DOTGraphTraits< RegionNode * >::getNodeLabel(), and llvm::operator<<().
|
protected |
This is the entry basic block that starts this region node. If this is a BasicBlock RegionNode, then entry is just the basic block, that this RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode.
In the BBtoRegionNode map of the parent of this node, BB will always map to this node no matter which kind of node this one is.
The node can hold either a Region or a BasicBlock. Use one bit to save, if this RegionNode is a subregion or BasicBlock RegionNode.
Definition at line 71 of file RegionInfo.h.
Referenced by llvm::Region::contains(), llvm::Region::getEnteringBlock(), getEntry(), isSubRegion(), and llvm::Region::replaceEntry().
|
protected |
The parent Region of this RegionNode.
Definition at line 75 of file RegionInfo.h.
Referenced by llvm::Region::addSubRegion(), llvm::Region::getDepth(), getParent(), and llvm::Region::removeSubRegion().