Package soot.shimple.toolkits.scalar
Class ShimpleLocalUses
- java.lang.Object
-
- soot.shimple.toolkits.scalar.ShimpleLocalUses
-
- All Implemented Interfaces:
LocalUses
public class ShimpleLocalUses extends Object implements LocalUses
This class implements the LocalUses interface for Shimple. ShimpleLocalUses can be used in conjunction with SimpleLocalDefs to provide Definition/Use and Use/Definition chains in SSA.In addition to the interface required by LocalUses, ShimpleLocalUses also provides a method for obtaining the list of uses given only the Local. Furthermore, unlike SimpleLocalUses, a LocalDefs object is not required when constructing ShimpleLocalUses.
- Author:
- Navindra Umanee
- See Also:
ShimpleLocalDefs,SimpleLocalDefs,SimpleLocalUses
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface soot.toolkits.scalar.LocalUses
LocalUses.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Local,List<UnitValueBoxPair>>localToUses
-
Constructor Summary
Constructors Constructor Description ShimpleLocalUses(ShimpleBody sb)Build a LocalUses interface from a ShimpleBody.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<UnitValueBoxPair>getUsesOf(Local local)Returns all the uses of the given Local as a list of UnitValueBoxPairs, each containing a Unit that uses the local and the corresponding ValueBox containing the Local.List<UnitValueBoxPair>getUsesOf(Unit unit)If a Local is defined in the Unit, returns all the uses of that Local as a list of UnitValueBoxPairs, each containing a Unit that uses the local and the corresponding ValueBox containing the Local.
-
-
-
Field Detail
-
localToUses
protected Map<Local,List<UnitValueBoxPair>> localToUses
-
-
Constructor Detail
-
ShimpleLocalUses
public ShimpleLocalUses(ShimpleBody sb)
Build a LocalUses interface from a ShimpleBody. Proper SSA form is required, otherwise correct behaviour is not guaranteed.
-
-
Method Detail
-
getUsesOf
public List<UnitValueBoxPair> getUsesOf(Local local)
Returns all the uses of the given Local as a list of UnitValueBoxPairs, each containing a Unit that uses the local and the corresponding ValueBox containing the Local.This method is currently not required by the LocalUses interface.
-
getUsesOf
public List<UnitValueBoxPair> getUsesOf(Unit unit)
If a Local is defined in the Unit, returns all the uses of that Local as a list of UnitValueBoxPairs, each containing a Unit that uses the local and the corresponding ValueBox containing the Local.
-
-