harpoon.Analysis.DataFlow
Class InstrSolver
java.lang.Object
harpoon.Analysis.DataFlow.InstrSolver
public final class InstrSolver
- extends Object
InstrSolver
- Version:
- $Id: InstrSolver.java,v 1.7 2005/12/01 07:54:07 salcianu Exp $
- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
worklistSolver
public static void worklistSolver(BasicBlock root,
DataFlowBasicBlockVisitor v)
- Performs dataflow analysis on a set of
BasicBlock
s. Finds a maximum fixed point for the
data-flow equations defined by v
.
requires:
- Every instruction in
root
and in the
BasicBlock
s linked to by
root
is an instance of an
Instr
.
v
can visit instructions of type
Instr
.
modifies: v
effects:
Sends v
into root
and the
BasicBlock
s linked to by root
,
performing v
's transfer function on each
BasicBlock
in turn, tracking for when no
change occurs, at which point the analysis is complete.
NOTE: While this method guarantees that
root
will be visited by v
,
there is no guarantee on the number of times, if at all,
v
will visit the siblings of
root
, and therefore the analysis may
terminate prematurely.
worklistSolver
public static void worklistSolver(Iterator iter,
DataFlowBasicBlockVisitor v)
- Performs dataflow analysis on a set of
BasicBlock
s. Finds a maximum fixed point for the
data-flow equations defined by v
.
requires:
- The elements of
iter
are
BasicBlock
s.
- Every instruction in the elements of
iter
and in the
BasicBlock
s linked to by the elements
of iter
is an instance of an
Instr
.
-
v
can visit instructions of type
Instr
.
modifies: v
, iter
effects:
Sends v
into the elements of
iter
and the BasicBlock
s
linked to by the elements of iter
,
performing v
's transfer function on each
BasicBlock
in turn, tracking for when no
change occurs, at which point the analysis is complete.
This method guarantees that all of the
BasicBlock
s in iter
will be
visited by v
at least once.
sccSolver
public static void sccSolver(Iterator it_scc,
DataFlowBasicBlockVisitor v)