Public Types | Public Member Functions | Public Attributes

analysis::PostdominatorTree Class Reference

#include <PostdominatorTree.h>

Inheritance diagram for analysis::PostdominatorTree:
Inheritance graph
Collaboration diagram for analysis::PostdominatorTree:
Collaboration graph

List of all members.

Public Types

typedef std::vector< int > IndexVector
typedef std::vector< IndexVectorIndexArrayVector

Public Member Functions

 PostdominatorTree (ir::ControlFlowGraph *cfg)
 ~PostdominatorTree ()
std::ostream & write (std::ostream &out)
bool postDominates (ir::ControlFlowGraph::iterator block, ir::ControlFlowGraph::iterator potentialPredecessor)
ir::ControlFlowGraph::iterator getPostDominator (ir::ControlFlowGraph::iterator block)

Public Attributes

ir::ControlFlowGraph::BlockPointerVector blocks
IndexVector p_dom
IndexArrayVector dominated
ir::ControlFlowGraph::BlockMap blocksToIndex

Detailed Description

A tree structure in which each node corresponds to a BasicBlock in the control flow graph such that each node's block is immediately post-dominated by its parent. Each node is owned by its parent.

Member Typedef Documentation

typedef std::vector<int> analysis::PostdominatorTree::IndexVector

Constructor & Destructor Documentation

analysis::PostdominatorTree::PostdominatorTree ( ir::ControlFlowGraph cfg)
analysis::PostdominatorTree::~PostdominatorTree ( )

Member Function Documentation

ir::ControlFlowGraph::iterator analysis::PostdominatorTree::getPostDominator ( ir::ControlFlowGraph::iterator  block)

Given a block known to be in the control flow graph, return the post dominator

bool analysis::PostdominatorTree::postDominates ( ir::ControlFlowGraph::iterator  block,
ir::ControlFlowGraph::iterator  potentialPredecessor 

Does a particular block post-dominate another block?

std::ostream & analysis::PostdominatorTree::write ( std::ostream &  out)

Writes a representation of the DominatorTree to an output stream

Member Data Documentation

store of the basic blocks in the dominator tree in post-order

Map from a BasicBlock pointer to an index into the blocks vector

Parent control flow graph

nth element stores a list of elements for which n is the immediate post-dominator

nth element stores the immediate post-dominator of node n or -1 if undefined

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines