harpoon.Analysis.DataFlow
Class InstrSolver

java.lang.Object
  extended by 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>

Method Summary
static void sccSolver(Iterator it_scc, DataFlowBasicBlockVisitor v)
           
static void worklistSolver(BasicBlock root, DataFlowBasicBlockVisitor v)
          Performs dataflow analysis on a set of BasicBlocks.
static void worklistSolver(Iterator iter, DataFlowBasicBlockVisitor v)
          Performs dataflow analysis on a set of BasicBlocks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

worklistSolver

public static void worklistSolver(BasicBlock root,
                                  DataFlowBasicBlockVisitor v)
Performs dataflow analysis on a set of BasicBlocks. Finds a maximum fixed point for the data-flow equations defined by v.
requires:
  1. Every instruction in root and in the BasicBlocks linked to by root is an instance of an Instr.
  2. v can visit instructions of type Instr.

modifies: v
effects: Sends v into root and the BasicBlocks 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 BasicBlocks. Finds a maximum fixed point for the data-flow equations defined by v.
requires:
  1. The elements of iter are BasicBlocks.
  2. Every instruction in the elements of iter and in the BasicBlocks linked to by the elements of iter is an instance of an Instr.
  3. v can visit instructions of type Instr.

modifies: v, iter
effects: Sends v into the elements of iter and the BasicBlocks 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 BasicBlocks in iter will be visited by v at least once.


sccSolver

public static void sccSolver(Iterator it_scc,
                             DataFlowBasicBlockVisitor v)