public class LiveVariablesProblem extends DataFlowProblem
DataFlowProblem.DF_Direction| Modifier and Type | Field and Description |
|---|---|
private java.util.List<LocalVariable> |
alwaysLiveVars |
private java.util.HashMap<Variable,DataFlowVar> |
dfVarMap |
private static java.util.Set<LocalVariable> |
EMPTY_SET |
private java.util.HashSet<LocalVariable> |
localVars |
static java.lang.String |
NAME |
private java.util.HashMap<java.lang.Integer,Variable> |
varDfVarMap |
private java.util.Collection<LocalVariable> |
varsLiveOnScopeExit |
direction, flowGraphNodes, scope| Constructor and Description |
|---|
LiveVariablesProblem(IRScope scope) |
LiveVariablesProblem(IRScope scope,
java.util.Set<LocalVariable> nonSelfLocalVars) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDFVar(Variable v) |
FlowGraphNode |
buildFlowGraphNode(BasicBlock bb) |
boolean |
dfVarExists(Variable v) |
java.util.Set<Variable> |
getAllVars() |
java.lang.String |
getDataFlowVarsForOutput() |
DataFlowVar |
getDFVar(Variable v) |
java.lang.String |
getName() |
java.util.Set<LocalVariable> |
getNonSelfLocalVars() |
Variable |
getVariable(int id) |
java.util.List<Variable> |
getVarsLiveOnScopeEntry()
Get variables that are live on entry to the cfg.
|
java.util.Collection<LocalVariable> |
getVarsLiveOnScopeExit() |
void |
markDeadInstructions() |
void |
setup(IRScope scope,
java.util.Collection<LocalVariable> allVars)
Initialize the problem with all vars from the surrounding scope variables.
|
void |
setVarsLiveOnScopeExit(java.util.Collection<LocalVariable> vars) |
compute_MOP_Solution, getDFVarsCount, getFlowDirection, getFlowGraphNode, getIncomingSourcesOf, getOutgoingDestinationsOf, getScope, isEmpty, setup, toStringpublic static final java.lang.String NAME
private static final java.util.Set<LocalVariable> EMPTY_SET
private java.util.HashMap<Variable,DataFlowVar> dfVarMap
private java.util.HashMap<java.lang.Integer,Variable> varDfVarMap
private java.util.HashSet<LocalVariable> localVars
private java.util.List<LocalVariable> alwaysLiveVars
private java.util.Collection<LocalVariable> varsLiveOnScopeExit
public LiveVariablesProblem(IRScope scope)
LiveVariablesProblem(IRScope scope, java.util.Set<LocalVariable> nonSelfLocalVars)
public DataFlowVar getDFVar(Variable v)
public boolean dfVarExists(Variable v)
public Variable getVariable(int id)
public FlowGraphNode buildFlowGraphNode(BasicBlock bb)
buildFlowGraphNode in class DataFlowProblempublic void addDFVar(Variable v)
public java.util.List<Variable> getVarsLiveOnScopeEntry()
public final void setup(IRScope scope, java.util.Collection<LocalVariable> allVars)
public java.lang.String getDataFlowVarsForOutput()
getDataFlowVarsForOutput in class DataFlowProblempublic void markDeadInstructions()
public void setVarsLiveOnScopeExit(java.util.Collection<LocalVariable> vars)
public java.util.Collection<LocalVariable> getVarsLiveOnScopeExit()
public java.util.Set<Variable> getAllVars()
public java.util.Set<LocalVariable> getNonSelfLocalVars()
public java.lang.String getName()
getName in class DataFlowProblem