LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::DominatorTreeBase Struct Reference

#include <Dominators.h>

Inheritance diagram for llvm::DominatorTreeBase:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DominatorTreeBase (bool isPostDom)
 ~DominatorTreeBase ()
virtual void releaseMemory ()
NodegetNode (BasicBlock *BB) const
Nodeoperator[] (BasicBlock *BB) const
NodegetRootNode ()
const NodegetRootNode () const
NodecreateNewNode (BasicBlock *BB, Node *IDomNode)
void changeImmediateDominator (Node *N, Node *NewIDom)
virtual void print (std::ostream &OS) const

Protected Types

typedef std::map< BasicBlock *,
Node * > 
NodeMapType

Protected Member Functions

void reset ()

Protected Attributes

std::map< BasicBlock *, Node * > Nodes
NodeRootNode

Classes

class  Node

Detailed Description

DominatorTree - Calculate the immediate dominator tree for a function.

Definition at line 280 of file Dominators.h.


Member Typedef Documentation

typedef std::map<BasicBlock*, Node*> llvm::DominatorTreeBase::NodeMapType [protected]
 

Definition at line 285 of file Dominators.h.


Constructor & Destructor Documentation

llvm::DominatorTreeBase::DominatorTreeBase bool  isPostDom  )  [inline]
 

Definition at line 327 of file Dominators.h.

llvm::DominatorTreeBase::~DominatorTreeBase  )  [inline]
 

Definition at line 328 of file Dominators.h.

References reset().


Member Function Documentation

void llvm::DominatorTreeBase::changeImmediateDominator Node N,
Node NewIDom
[inline]
 

changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.

Definition at line 371 of file Dominators.h.

References llvm::DominatorTreeBase::Node::setIDom().

Node* llvm::DominatorTreeBase::createNewNode BasicBlock BB,
Node IDomNode
[inline]
 

createNewNode - Add a new node to the dominator tree information. This creates a new node as a child of IDomNode, linking it into the children list of the immediate dominator.

Definition at line 362 of file Dominators.h.

References llvm::DominatorTreeBase::Node::addChild(), getNode(), and Nodes.

Node* llvm::DominatorTreeBase::getNode BasicBlock BB  )  const [inline]
 

getNode - return the (Post)DominatorTree node for the specified basic block. This is the same as using operator[] on this class.

Definition at line 335 of file Dominators.h.

References Nodes.

Referenced by createNewNode(), and operator[]().

const Node* llvm::DominatorTreeBase::getRootNode  )  const [inline]
 

Definition at line 352 of file Dominators.h.

References RootNode.

Node* llvm::DominatorTreeBase::getRootNode  )  [inline]
 

getRootNode - This returns the entry node for the CFG of the function. If this tree represents the post-dominance relations for a function, however, this root may be a node with the block == NULL. This is the case when there are multiple exit nodes from a particular function. Consumers of post-dominance information must be capable of dealing with this possibility.

Definition at line 351 of file Dominators.h.

References RootNode.

Referenced by llvm::GraphTraits< DominatorTree * >::getEntryNode(), print(), and llvm::PostDominanceFrontier::runOnFunction().

Node* llvm::DominatorTreeBase::operator[] BasicBlock BB  )  const [inline]
 

Definition at line 340 of file Dominators.h.

References getNode().

void DominatorTreeBase::print std::ostream &  OS  )  const [virtual]
 

print - Convert to human readable form

Reimplemented from llvm::Pass.

Definition at line 411 of file Dominators.cpp.

References getRootNode(), and PrintDomTree().

virtual void llvm::DominatorTreeBase::releaseMemory  )  [inline, virtual]
 

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.

Optionally implement this function to release pass memory when it is no longer used.

Reimplemented from llvm::Pass.

Definition at line 330 of file Dominators.h.

References reset().

void DominatorTreeBase::reset  )  [protected]
 

Definition at line 336 of file Dominators.cpp.

References E, I, Nodes, and RootNode.

Referenced by releaseMemory(), llvm::PostDominatorTree::runOnFunction(), llvm::DominatorTree::runOnFunction(), and ~DominatorTreeBase().


Member Data Documentation

std::map<BasicBlock*, Node*> llvm::DominatorTreeBase::Nodes [protected]
 

Definition at line 281 of file Dominators.h.

Referenced by createNewNode(), getNode(), and reset().

Node* llvm::DominatorTreeBase::RootNode [protected]
 

Definition at line 287 of file Dominators.h.

Referenced by getRootNode(), and reset().


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