joeq.Compiler.Analysis.IPSSA.Utils
Class SimpleDominatorQuery

java.lang.Object
  extended by joeq.Compiler.Analysis.IPSSA.Utils.SimpleDominatorQuery
All Implemented Interfaces:
DominatorQuery

public class SimpleDominatorQuery
extends Object
implements DominatorQuery

A pretty obvious implementation of DominatorQuery, nothing fancy here. Needs to be optimized for future use.

Version:
$Id: SimpleDominatorQuery.java 1931 2004-09-22 22:17:47Z joewhaley $
Author:
V.Benjamin Livshits
See Also:
SimpleDominatorQuery.TestSimpleDominatorQuery

Nested Class Summary
static class SimpleDominatorQuery.TestSimpleDominatorQuery
           
 
Constructor Summary
SimpleDominatorQuery(jq_Method m)
           
 
Method Summary
 BasicBlock getBasicBlock(Quad quad)
           
 void getDominanceFrontier(Quad q, Set set)
          Fills set with the dominance frontier of q
 Quad getImmediateDominator(Quad q)
          The result is null for the top node of the CFG.
 void getIteratedDominanceFrontier(Quad q, Set set)
          Fills set with the iterated dominance frontier of q
 boolean isTop(Quad q)
          Checks if the node is the top node of the CFG.
 void printDot(PrintStream out)
          Prints the dominator tree on Quads in dot format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDominatorQuery

public SimpleDominatorQuery(jq_Method m)
Method Detail

getImmediateDominator

public Quad getImmediateDominator(Quad q)
Description copied from interface: DominatorQuery
The result is null for the top node of the CFG.

Specified by:
getImmediateDominator in interface DominatorQuery

isTop

public boolean isTop(Quad q)
Description copied from interface: DominatorQuery
Checks if the node is the top node of the CFG.

Specified by:
isTop in interface DominatorQuery

getDominanceFrontier

public void getDominanceFrontier(Quad q,
                                 Set set)
Description copied from interface: DominatorQuery
Fills set with the dominance frontier of q

Specified by:
getDominanceFrontier in interface DominatorQuery

getIteratedDominanceFrontier

public void getIteratedDominanceFrontier(Quad q,
                                         Set set)
Description copied from interface: DominatorQuery
Fills set with the iterated dominance frontier of q

Specified by:
getIteratedDominanceFrontier in interface DominatorQuery

printDot

public void printDot(PrintStream out)
Prints the dominator tree on Quads in dot format.

Specified by:
printDot in interface DominatorQuery

getBasicBlock

public BasicBlock getBasicBlock(Quad quad)
Specified by:
getBasicBlock in interface DominatorQuery


Copyright © 2001-2008 John Whaley. All Rights Reserved.