Package org.jruby.ir.dataflow.analyses
Class LiveVariableNode
java.lang.Object
org.jruby.ir.dataflow.FlowGraphNode<LiveVariablesProblem,LiveVariableNode>
org.jruby.ir.dataflow.analyses.LiveVariableNode
-
Field Summary
FieldsFields inherited from class org.jruby.ir.dataflow.FlowGraphNode
basicBlock, problem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidInitialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.voidApply transfer function to the instructionvoidBuilds the data-flow variables (or facts) for a particular instruction.voidcompute_MEET(org.jruby.dirgra.Edge e, LiveVariableNode 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.voidAny required cleanup of state after applying transfer function(package private) BitSet(package private) BitSetvoidinit()Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.voidAny setting up of state/initialization before applying transfer functionprivate voidCollect variables live out of the exception target node.private voidmarkAllVariablesLive(LiveVariablesProblem lvp, Collection<? extends Variable> variableList) (package private) voidprivate voidbooleanDid dataflow solution for this node change from last time?toString()Methods inherited from class org.jruby.ir.dataflow.FlowGraphNode
buildDataFlowVars, computeDataFlowInfo, computeDataFlowInfoBackward, computeDataFlowInfoForward, getBB, getCFG, getExceptionTargetNode, hasExceptionsRescued
-
Field Details
-
in
-
out
-
living
-
setSize
private int setSize
-
-
Constructor Details
-
LiveVariableNode
-
-
Method Details
-
init
public void init()Description copied from class:FlowGraphNodeInitialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.- Overrides:
initin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
addDFVar
-
buildDataFlowVars
Description copied from class:FlowGraphNodeBuilds the data-flow variables (or facts) for a particular instruction.- Specified by:
buildDataFlowVarsin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
applyPreMeetHandler
public void applyPreMeetHandler()Description copied from class:FlowGraphNodeInitialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.- Specified by:
applyPreMeetHandlerin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
compute_MEET
Description copied from class:FlowGraphNode"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.- Specified by:
compute_MEETin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
markAllVariablesLive
private void markAllVariablesLive(LiveVariablesProblem lvp, Collection<? extends Variable> variableList) -
markVariableLive
-
initSolution
public void initSolution()Description copied from class:FlowGraphNodeAny setting up of state/initialization before applying transfer function- Overrides:
initSolutionin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
applyTransferFunction
Description copied from class:FlowGraphNodeApply transfer function to the instruction- Specified by:
applyTransferFunctionin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
solutionChanged
public boolean solutionChanged()Description copied from class:FlowGraphNodeDid dataflow solution for this node change from last time?- Specified by:
solutionChangedin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
finalizeSolution
public void finalizeSolution()Description copied from class:FlowGraphNodeAny required cleanup of state after applying transfer function- Overrides:
finalizeSolutionin classFlowGraphNode<LiveVariablesProblem,LiveVariableNode>
-
makeOutExceptionVariablesLiving
private void makeOutExceptionVariablesLiving()Collect variables live out of the exception target node. Since this instr. can directly jump to the rescue block (or scope exit) without executing the rest of the instructions in this bb, we have a control-flow edge from this instr. to that block. Since we dont want to add a control-flow edge from pretty much every instr. to the rescuer/exit BB, we are handling it implicitly here. -
toString
-
markDeadInstructions
void markDeadInstructions() -
getLiveInBitSet
BitSet getLiveInBitSet() -
getLiveOutBitSet
BitSet getLiveOutBitSet()
-