Package com.ibm.wala.ssa
Class CompoundPiPolicy
- java.lang.Object
-
- com.ibm.wala.ssa.CompoundPiPolicy
-
- All Implemented Interfaces:
SSAPiNodePolicy
public class CompoundPiPolicy extends Object implements SSAPiNodePolicy
A Combination of 2SSAPiNodePolicys. This policy will insert Pi nodes if either of two delegate policies says to.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompoundPiPolicycreateCompoundPiPolicy(SSAPiNodePolicy p1, SSAPiNodePolicy p2)booleanequals(Object obj)Pair<Integer,SSAInstruction>getPi(SSAAbstractInvokeInstruction call, SymbolTable symbolTable)Do we need to introduce a new name for some value immediately after a call? If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instructionPair<Integer,SSAInstruction>getPi(SSAConditionalBranchInstruction cond, SSAInstruction def1, SSAInstruction def2, SymbolTable symbolTable)Do we need to introduce a new name for some value after deciding on an outcome for a conditional branch instruction? If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instructioninthashCode()
-
-
-
Method Detail
-
createCompoundPiPolicy
public static CompoundPiPolicy createCompoundPiPolicy(SSAPiNodePolicy p1, SSAPiNodePolicy p2)
- Parameters:
p1- firstSSAPiNodePolicyto delegate top2- secondSSAPiNodePolicyto delegate to
-
getPi
public Pair<Integer,SSAInstruction> getPi(SSAConditionalBranchInstruction cond, SSAInstruction def1, SSAInstruction def2, SymbolTable symbolTable)
Description copied from interface:SSAPiNodePolicyDo we need to introduce a new name for some value after deciding on an outcome for a conditional branch instruction? If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instruction- Specified by:
getPiin interfaceSSAPiNodePolicy- Parameters:
cond- the conditional branch instruction in questiondef1- theSSAInstructionthat defs cond.getUse(0), or null if nonedef2- theSSAInstructionthat defs cond.getUse(1), or null if nonesymbolTable- current state of the symbol table for the IR under construction- Returns:
- description of the necessary pi instruction, or null if no pi instruction is needed.
-
getPi
public Pair<Integer,SSAInstruction> getPi(SSAAbstractInvokeInstruction call, SymbolTable symbolTable)
Description copied from interface:SSAPiNodePolicyDo we need to introduce a new name for some value immediately after a call? If so, returns a pair consisting of the value number needing renaming, and the instruction which should be recorded as the cause of the pi instruction- Specified by:
getPiin interfaceSSAPiNodePolicy- Parameters:
call- the call instruction in questionsymbolTable- current state of the symbol table for the IR under construction- Returns:
- description of the necessary pi instruction, or null if no pi instruction is needed.
-
-