LLVM API Documentation
#include <Dominators.h>
Inheritance diagram for llvm::DominatorTreeBase:
Public Member Functions | |
DominatorTreeBase (bool isPostDom) | |
~DominatorTreeBase () | |
virtual void | releaseMemory () |
Node * | getNode (BasicBlock *BB) const |
Node * | operator[] (BasicBlock *BB) const |
Node * | getRootNode () |
const Node * | getRootNode () const |
Node * | createNewNode (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 |
Node * | RootNode |
Classes | |
class | Node |
Definition at line 286 of file Dominators.h.
typedef std::map<BasicBlock*, Node*> llvm::DominatorTreeBase::NodeMapType [protected] |
Definition at line 292 of file Dominators.h.
llvm::DominatorTreeBase::DominatorTreeBase | ( | bool | isPostDom | ) | [inline] |
Definition at line 343 of file Dominators.h.
llvm::DominatorTreeBase::~DominatorTreeBase | ( | ) | [inline] |
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.
Referenced by createNewNode(), operator[](), and llvm::SplitCriticalEdge().
Node* llvm::DominatorTreeBase::operator[] | ( | BasicBlock * | BB | ) | const [inline] |
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] |
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().
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().
std::map<BasicBlock*, Node*> llvm::DominatorTreeBase::Nodes [protected] |
Node* llvm::DominatorTreeBase::RootNode [protected] |