|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.shimple.internal.PhiNodeManager
public class PhiNodeManager
ShimpleBody
,
Efficiently
Computing Static Single Assignment Form and the Control Dependence
GraphField Summary | |
---|---|
protected ShimpleBody |
body
|
protected BlockGraph |
cfg
|
protected DominanceFrontier |
df
|
protected DominatorTree |
dt
|
protected GuaranteedDefs |
gd
|
protected ShimpleFactory |
sf
|
protected Map<Unit,Block> |
unitToBlock
|
protected MultiMap |
varToBlocks
|
Constructor Summary | |
---|---|
PhiNodeManager(ShimpleBody body)
|
Method Summary | |
---|---|
boolean |
doEliminatePhiNodes()
Eliminate Phi nodes in block by naively replacing them with shimple assignment statements in the control flow predecessors. |
boolean |
dominates(Unit champ,
Unit challenger)
Returns true if champ dominates challenger. |
Map<Unit,Block> |
getUnitToBlockMap(BlockGraph blocks)
Convenience function that maps units to blocks. |
boolean |
insertTrivialPhiNodes()
Phi node Insertion Algorithm from Cytron et al 91, P24-5, |
protected boolean |
needsPhiNode(Local local,
Block block)
Function that allows us to weed out special cases where we do not require Phi nodes. |
void |
prependTrivialPhiNode(Local local,
Block frontierBlock)
Inserts a trivial Phi node with the appropriate number of arguments. |
void |
trimExceptionalPhiNodes()
Exceptional Phi nodes have a huge number of arguments and control flow predecessors by default. |
void |
trimPhiNode(PhiExpr phiExpr)
|
void |
update()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ShimpleBody body
protected ShimpleFactory sf
protected DominatorTree dt
protected DominanceFrontier df
protected BlockGraph cfg
protected GuaranteedDefs gd
protected MultiMap varToBlocks
protected Map<Unit,Block> unitToBlock
Constructor Detail |
---|
public PhiNodeManager(ShimpleBody body)
Method Detail |
---|
public void update()
public boolean insertTrivialPhiNodes()
Special Java case: If a variable is not defined along all paths of entry to a node, a Phi node is not needed.
public void prependTrivialPhiNode(Local local, Block frontierBlock)
protected boolean needsPhiNode(Local local, Block block)
Temporary implementation, with much room for improvement.
public void trimExceptionalPhiNodes()
public void trimPhiNode(PhiExpr phiExpr)
trimExceptionalPhiNodes()
public boolean dominates(Unit champ, Unit challenger)
public boolean doEliminatePhiNodes()
public Map<Unit,Block> getUnitToBlockMap(BlockGraph blocks)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |