public class SimpleLocalUses extends java.lang.Object implements LocalUses
LocalUses.Factory
Constructor and Description |
---|
SimpleLocalUses(Body body,
LocalDefs localDefs)
Construct the analysis from a method body and a LocalDefs
interface.
|
SimpleLocalUses(UnitGraph graph,
LocalDefs localDefs)
Construct the analysis from a UnitGraph representation
of a method body and a LocalDefs interface.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Local> |
getUnusedVariables()
Gets all variables that are not used in this body
|
java.util.Set<Local> |
getUsedVariables()
Gets all variables that are used in this body
|
java.util.List<UnitValueBoxPair> |
getUsesOf(Unit s)
Uses for a Local defined at a given Unit are returned as
a list of UnitValueBoxPairs each containing a Unit that use the
local and the Local itself wrapped in a ValueBox.
|
public SimpleLocalUses(UnitGraph graph, LocalDefs localDefs)
Note: If you do not already have a UnitGraph, it may be cheaper to use the constructor which only requires a Body.
public java.util.List<UnitValueBoxPair> getUsesOf(Unit s)
public java.util.Set<Local> getUsedVariables()
public java.util.Set<Local> getUnusedVariables()