org.jruby.compiler.ir.dataflow
Class FlowGraphNode

java.lang.Object
  extended by org.jruby.compiler.ir.dataflow.FlowGraphNode
Direct Known Subclasses:
LiveVariableNode

public abstract class FlowGraphNode
extends java.lang.Object


Field Summary
protected  BasicBlock _bb
           
protected  DataFlowProblem _prob
           
 
Constructor Summary
FlowGraphNode(DataFlowProblem p, BasicBlock n)
           
 
Method Summary
abstract  boolean applyTransferFunction()
          Compute "OUT/IN" for the current node! The choice of "IN/OUT" is determined by the direction of data flow.
 void buildDataFlowVars()
          Builds the data-flow variables (or facts) for a particular node.
abstract  void buildDataFlowVars(IR_Instr i)
          Builds the data-flow variables (or facts) for a particular instruction.
abstract  void compute_MEET(CFG.CFG_Edge edge, FlowGraphNode pred)
          "MEET" current solution of "IN/OUT" with "OUT/IN(pred)", where "pred" is a predecessor of the current node! The choice of "IN/OUT" is determined by the direction of data flow.
 void computeDataFlowInfo(java.util.List<FlowGraphNode> workList, java.util.BitSet bbSet)
           
 void finalizeSolnForNode()
          After meet has been performed, do some more logic.
 void init()
          Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.
abstract  void initSolnForNode()
          Initialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_prob

protected DataFlowProblem _prob

_bb

protected BasicBlock _bb
Constructor Detail

FlowGraphNode

public FlowGraphNode(DataFlowProblem p,
                     BasicBlock n)
Method Detail

initSolnForNode

public abstract void initSolnForNode()
Initialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.


compute_MEET

public abstract void compute_MEET(CFG.CFG_Edge edge,
                                  FlowGraphNode pred)
"MEET" current solution of "IN/OUT" with "OUT/IN(pred)", where "pred" is a predecessor of the current node! The choice of "IN/OUT" is determined by the direction of data flow.


applyTransferFunction

public abstract boolean applyTransferFunction()
Compute "OUT/IN" for the current node! The choice of "IN/OUT" is determined by the direction of data flow. OUT/IN = transfer-function(facts at start/end of node, instructions of current node processed in fwd/reverse dirn)


buildDataFlowVars

public abstract void buildDataFlowVars(IR_Instr i)
Builds the data-flow variables (or facts) for a particular instruction.


init

public void init()
Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.


finalizeSolnForNode

public void finalizeSolnForNode()
After meet has been performed, do some more logic.


buildDataFlowVars

public void buildDataFlowVars()
Builds the data-flow variables (or facts) for a particular node. Need only create the DF_Var for them to be added to the problem. Goes over the instructions in this basic block and collect all relevant LOCAL data flow vars for this problem!


computeDataFlowInfo

public void computeDataFlowInfo(java.util.List<FlowGraphNode> workList,
                                java.util.BitSet bbSet)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.