GPUOcelot
Public Member Functions | Public Attributes

analysis::DominatorTree Class Reference

#include <DominatorTree.h>

Inheritance diagram for analysis::DominatorTree:
Inheritance graph
[legend]
Collaboration diagram for analysis::DominatorTree:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DominatorTree (ir::ControlFlowGraph *cfg)
 ~DominatorTree ()
std::ostream & write (std::ostream &out)
bool dominates (ir::ControlFlowGraph::iterator block, ir::ControlFlowGraph::iterator potentialSuccessor)
ir::ControlFlowGraph::iterator getDominator (ir::ControlFlowGraph::iterator block)

Public Attributes

ir::ControlFlowGraphcfg
ir::ControlFlowGraph::BlockPointerVector blocks
std::vector< int > i_dom
std::vector< std::vector< int > > 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 dominated by its parent. Each node is owned by its parent.


Constructor & Destructor Documentation

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

Member Function Documentation

bool analysis::DominatorTree::dominates ( ir::ControlFlowGraph::iterator  block,
ir::ControlFlowGraph::iterator  potentialSuccessor 
)

Does a particular block dominate another block?

ir::ControlFlowGraph::iterator analysis::DominatorTree::getDominator ( ir::ControlFlowGraph::iterator  block)

Get the dominator of a given block

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

Writes a representation of the DominatorTree to an output stream


Member Data Documentation

the basic blocks in the CFG and dominator tree

Mapping from a BasicBlock to an index into the blocks vector

Parent control flow graph

std::vector< std::vector<int> > analysis::DominatorTree::dominated

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

std::vector< int > analysis::DominatorTree::i_dom

nth element stores the immediate 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