LLVM API Documentation

Public Member Functions | Protected Attributes
llvm::RegionNode Class Reference

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

#include <RegionInfo.h>

Inheritance diagram for llvm::RegionNode:
Inheritance graph
[legend]
Collaboration diagram for llvm::RegionNode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RegionNode (Region *Parent, BasicBlock *Entry, bool isSubRegion=0)
 Create a RegionNode.
RegiongetParent () const
 Get the parent Region of this RegionNode.
BasicBlockgetEntry () 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?

Protected Attributes

PointerIntPair< BasicBlock
*, 1, bool
entry
Regionparent
 The parent Region of this RegionNode.

Detailed Description

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

Definition at line 56 of file RegionInfo.h.


Constructor & Destructor Documentation

llvm::RegionNode::RegionNode ( Region Parent,
BasicBlock Entry,
bool  isSubRegion = 0 
) [inline]

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


Member Function Documentation

BasicBlock* llvm::RegionNode::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::Region.

Definition at line 105 of file RegionInfo.h.

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

Region * llvm::RegionNode::getNodeAs< Region > ( ) 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.

Definition at line 129 of file RegionInfo.h.

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

Region* llvm::RegionNode::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::Region.

Definition at line 97 of file RegionInfo.h.

References parent.

bool llvm::RegionNode::isSubRegion ( ) const [inline]

Member Data Documentation

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().


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