|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.backend.Domination
public class Domination
This class computes the dominators and post dominators of nodes in a graph.
$Id: Domination.java,v 1.9 2007-10-04 19:57:48 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
As described in A Fast Algorithm for Finding Dominators in a Flowgraph by Lengauer and Tarjan, ACM. Tran. on Prog. Lang and System, July 1979.
| Constructor Summary | |
|---|---|
Domination(boolean post,
Node start)
|
|
| Method Summary | |
|---|---|
static int |
computed()
Return the number of times the dominance frontier was computed. |
static int |
created()
Return the number of instances of this class that were created. |
static int |
deadNodes()
Return the number of dead nodes removed. |
void |
displayDominance(java.io.PrintStream s,
Node n)
Print out my dominance relations. |
Node[] |
getDominatees(Node n)
Return an iteration of the nodes that n strictly dominates. |
Node |
getDominatorOf(Node v)
Return the dominator of v. |
Vector<Node> |
getIterativeDomination(Node n)
Return the set of all nodes strictly dominated by node n and all nodes dominated by nodes dominated by n, and so on. |
protected void |
getIterativeDomination(Node n,
Vector<Node> v)
Return the set of all nodes strictly dominated by node n and all nodes dominated by nodes dominated by n, and so on. |
boolean |
inDominatees(Node n,
Node d)
Return true if PFG node n dominates node d. |
boolean |
isPostDomination()
Return true if this domination is a post domination. |
int |
numDominatees(Node n)
Return the number of the nodes that n dominates. |
void |
pushDominatees(Node n,
Stack<java.lang.Object> wl)
Push onto the stack all of the nodes that n strictly dominates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Domination(boolean post,
Node start)
post - false for dominators, true for post dominators to be
determinedstart - the starting node in the graph (or end if post
dominators)| Method Detail |
|---|
public static int created()
public static int computed()
public static int deadNodes()
public final Node getDominatorOf(Node v)
public final Node[] getDominatees(Node n)
n strictly dominates.
public final void pushDominatees(Node n,
Stack<java.lang.Object> wl)
public final int numDominatees(Node n)
public final Vector<Node> getIterativeDomination(Node n)
n - is the dominator node
protected void getIterativeDomination(Node n,
Vector<Node> v)
n - is the dominator nodev - is the vector to which the dominated nodes are added
public final boolean inDominatees(Node n,
Node d)
n - the node to testd - the node to test
public final void displayDominance(java.io.PrintStream s,
Node n)
s - the stream to write topublic final boolean isPostDomination()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||