coins.aflow
Class MakeDominatorTree

java.lang.Object
  extended bycoins.aflow.MakeDominatorTree
Direct Known Subclasses:
MakeDominatorTreeForSubpFlow, MakePostdominatorTreeForSubpFlow

public class MakeDominatorTree
extends java.lang.Object

Makes a dominator tree for the given list of BBlocks.


Field Summary
protected  SubpFlow fSubpFlow
           
protected  IoRoot ioRoot
           
 
Constructor Summary
MakeDominatorTree()
           
 
Method Summary
protected  void link(TreeStructure pTree, BBlock pParent, BBlock pChild)
          Links the given two nodes in the given tree structure.
 TreeStructure makeDominatorTreeFor(SubpFlow pSubpFlow, java.util.List pBBlocks, BBlock pEntry, boolean pIsDom)
          Makes a (post)dominator tree for the given list of BBlocks.
protected  void saveDom(BBlock pBBlock, java.util.List pDom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fSubpFlow

protected SubpFlow fSubpFlow

ioRoot

protected IoRoot ioRoot
Constructor Detail

MakeDominatorTree

public MakeDominatorTree()
Method Detail

makeDominatorTreeFor

public TreeStructure makeDominatorTreeFor(SubpFlow pSubpFlow,
                                          java.util.List pBBlocks,
                                          BBlock pEntry,
                                          boolean pIsDom)
Makes a (post)dominator tree for the given list of BBlocks. pEntry will be the root of the tree. The list of BBlocks pBBlocks should be connected and every BBlock should be reachable from (should reach) pBBlock.

Parameters:
pIsDom - if true, find dominator tree, otherwise, find postdominator tree.
Returns:
the resultant coins.aflow.util.TreeStructure object.

saveDom

protected void saveDom(BBlock pBBlock,
                       java.util.List pDom)

link

protected void link(TreeStructure pTree,
                    BBlock pParent,
                    BBlock pChild)
Links the given two nodes in the given tree structure.