LLVM API Documentation

llvm::DominatorTreeBase Class 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 Module *=0) 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 286 of file Dominators.h.


Member Typedef Documentation

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

Definition at line 292 of file Dominators.h.


Constructor & Destructor Documentation

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

Definition at line 343 of file Dominators.h.

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

Definition at line 344 of file Dominators.h.

References reset().


Member Function Documentation

void DominatorTreeBase::reset (  )  [protected]

Definition at line 340 of file Dominators.cpp.

References E, Nodes, and RootNode.

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

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 346 of file Dominators.h.

References reset().

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 351 of file Dominators.h.

References BB, and Nodes.

Referenced by createNewNode(), operator[](), and llvm::SplitCriticalEdge().

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

Definition at line 356 of file Dominators.h.

References BB, and getNode().

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 367 of file Dominators.h.

References RootNode.

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

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

Definition at line 368 of file Dominators.h.

References RootNode.

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 378 of file Dominators.h.

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

Referenced by llvm::SplitCriticalEdge().

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 387 of file Dominators.h.

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

void DominatorTreeBase::print ( std::ostream &  OS,
const Module = 0 
) const [virtual]

print - Convert to human readable form

Reimplemented from llvm::Pass.

Definition at line 415 of file Dominators.cpp.

References getRootNode(), and PrintDomTree().


Member Data Documentation

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

Definition at line 288 of file Dominators.h.

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

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

Definition at line 294 of file Dominators.h.

Referenced by getRootNode(), and reset().


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