Class SSAPropagationCallGraphBuilder.ConstraintVisitor
java.lang.Object
com.ibm.wala.ssa.SSAInstruction.Visitor
com.ibm.wala.ipa.callgraph.propagation.SSAPropagationCallGraphBuilder.ConstraintVisitor
- All Implemented Interfaces:
SSAInstruction.IVisitor
- Direct Known Subclasses:
AstSSAPropagationCallGraphBuilder.AstConstraintVisitor
- Enclosing class:
SSAPropagationCallGraphBuilder
protected static class SSAPropagationCallGraphBuilder.ConstraintVisitor
extends SSAInstruction.Visitor
A visitor that generates constraints based on statements in SSA form.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
protected static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected ISSABasicBlock
The basic block currently being processedprotected final SSAPropagationCallGraphBuilder
The governing call graph builder.protected final DefUse
Def-use informationprotected final IRView
The governing IRprotected final CGNode
The node whose statements we are currently traversingprotected final SymbolTable
Governing symbol tableprotected final PropagationSystem
The governing propagation system, into which constraints are added -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
contentsAreInvariant
(SymbolTable symbolTable, DefUse du, int valueNumber) protected boolean
contentsAreInvariant
(SymbolTable symbolTable, DefUse du, int[] valueNumber) protected void
doVisitArrayLoad
(int def, int arrayRef) void
doVisitArrayStore
(int arrayRef, int value) protected IAnalysisCacheView
protected SSAPropagationCallGraphBuilder
protected IClassHierarchy
getFilteredPointerKeyForLocal
(int valueNumber, FilteredPointerKey.TypeFilter filter) getInstanceKeyForAllocation
(NewSiteReference allocation) getInstanceKeyForClassObject
(Object obj, TypeReference type) <T> InstanceKey
getInstanceKeyForMultiNewArray
(NewSiteReference allocation, int dim) getInstanceKeyForPEI
(ProgramCounter instr, TypeReference type) protected InstanceKey[]
getInvariantContents
(int valueNumber) protected InstanceKey[]
getInvariantContents
(SymbolTable symbolTable, DefUse du, CGNode node, int valueNumber) protected AnalysisOptions
getPointerKeyForLocal
(int valueNumber) getTargetForCall
(CGNode caller, CallSiteReference site, IClass recv, InstanceKey[] iKey) protected boolean
hasNoInterestingUses
(int vn) protected boolean
isRootType
(IClass klass) protected void
processClassInitializer
(IClass klass) TODO: lift most of this logic to PropagationCallGraphBuildervoid
processPutField
(int rval, int ref, IField f) protected void
processPutStatic
(int rval, FieldReference field, IField f) void
setBasicBlock
(ISSABasicBlock block) The calling loop must call this in each iteration!void
visitArrayLoad
(SSAArrayLoadInstruction instruction) void
visitArrayStore
(SSAArrayStoreInstruction instruction) void
visitCheckCast
(SSACheckCastInstruction instruction) void
visitGet
(SSAGetInstruction instruction) void
visitGetCaughtException
(SSAGetCaughtExceptionInstruction instruction) protected void
visitGetInternal
(int lval, int ref, boolean isStatic, FieldReference field) void
visitInvoke
(SSAInvokeInstruction instruction) protected void
visitInvokeInternal
(SSAAbstractInvokeInstruction instruction, SSAPropagationCallGraphBuilder.ConstraintVisitor.InvariantComputer invs) void
visitLoadMetadata
(SSALoadMetadataInstruction instruction) void
visitNew
(SSANewInstruction instruction) void
visitPhi
(SSAPhiInstruction instruction) void
visitPi
(SSAPiInstruction instruction) void
visitPut
(SSAPutInstruction instruction) void
visitPutInternal
(int rval, int ref, boolean isStatic, FieldReference field) void
visitReturn
(SSAReturnInstruction instruction) void
visitThrow
(SSAThrowInstruction instruction) Methods inherited from class com.ibm.wala.ssa.SSAInstruction.Visitor
visitArrayLength, visitBinaryOp, visitComparison, visitConditionalBranch, visitConversion, visitGoto, visitInstanceof, visitMonitor, visitSwitch, visitUnaryOp
-
Field Details
-
builder
The governing call graph builder. This field is used instead of an inner class in order to allow more flexible reuse of this visitor in subclasses -
node
The node whose statements we are currently traversing -
ir
The governing IR -
system
The governing propagation system, into which constraints are added -
basicBlock
The basic block currently being processed -
symbolTable
Governing symbol table -
du
Def-use information
-
-
Constructor Details
-
ConstraintVisitor
-
-
Method Details
-
getBuilder
-
getOptions
-
getAnalysisCache
-
getPointerKeyForLocal
-
getFilteredPointerKeyForLocal
public FilteredPointerKey getFilteredPointerKeyForLocal(int valueNumber, FilteredPointerKey.TypeFilter filter) -
getPointerKeyForReturnValue
-
getPointerKeyForExceptionalReturnValue
-
getPointerKeyForStaticField
-
getPointerKeyForInstanceField
-
getPointerKeyForArrayContents
-
getInstanceKeyForAllocation
-
getInstanceKeyForMultiNewArray
-
getInstanceKeyForConstant
-
getInstanceKeyForPEI
-
getInstanceKeyForClassObject
-
getTargetForCall
public CGNode getTargetForCall(CGNode caller, CallSiteReference site, IClass recv, InstanceKey[] iKey) -
contentsAreInvariant
-
contentsAreInvariant
-
getInvariantContents
-
getInvariantContents
protected InstanceKey[] getInvariantContents(SymbolTable symbolTable, DefUse du, CGNode node, int valueNumber) -
getClassHierarchy
-
hasNoInterestingUses
protected boolean hasNoInterestingUses(int vn) -
isRootType
-
visitArrayLoad
- Specified by:
visitArrayLoad
in interfaceSSAInstruction.IVisitor
- Overrides:
visitArrayLoad
in classSSAInstruction.Visitor
-
doVisitArrayLoad
protected void doVisitArrayLoad(int def, int arrayRef) -
doVisitArrayStore
public void doVisitArrayStore(int arrayRef, int value) - See Also:
-
visitArrayStore
- Specified by:
visitArrayStore
in interfaceSSAInstruction.IVisitor
- Overrides:
visitArrayStore
in classSSAInstruction.Visitor
-
visitCheckCast
- Specified by:
visitCheckCast
in interfaceSSAInstruction.IVisitor
- Overrides:
visitCheckCast
in classSSAInstruction.Visitor
-
visitReturn
- Specified by:
visitReturn
in interfaceSSAInstruction.IVisitor
- Overrides:
visitReturn
in classSSAInstruction.Visitor
-
visitGet
- Specified by:
visitGet
in interfaceSSAInstruction.IVisitor
- Overrides:
visitGet
in classSSAInstruction.Visitor
-
visitGetInternal
-
visitPut
- Specified by:
visitPut
in interfaceSSAInstruction.IVisitor
- Overrides:
visitPut
in classSSAInstruction.Visitor
-
visitPutInternal
-
processPutField
-
processPutStatic
-
visitInvoke
- Specified by:
visitInvoke
in interfaceSSAInstruction.IVisitor
- Overrides:
visitInvoke
in classSSAInstruction.Visitor
-
visitInvokeInternal
protected void visitInvokeInternal(SSAAbstractInvokeInstruction instruction, SSAPropagationCallGraphBuilder.ConstraintVisitor.InvariantComputer invs) -
visitNew
- Specified by:
visitNew
in interfaceSSAInstruction.IVisitor
- Overrides:
visitNew
in classSSAInstruction.Visitor
-
visitThrow
- Specified by:
visitThrow
in interfaceSSAInstruction.IVisitor
- Overrides:
visitThrow
in classSSAInstruction.Visitor
-
visitGetCaughtException
- Specified by:
visitGetCaughtException
in interfaceSSAInstruction.IVisitor
- Overrides:
visitGetCaughtException
in classSSAInstruction.Visitor
-
visitPhi
- Specified by:
visitPhi
in interfaceSSAInstruction.IVisitor
- Overrides:
visitPhi
in classSSAInstruction.Visitor
-
visitPi
- Specified by:
visitPi
in interfaceSSAInstruction.IVisitor
- Overrides:
visitPi
in classSSAInstruction.Visitor
-
getBasicBlock
-
setBasicBlock
The calling loop must call this in each iteration! -
visitLoadMetadata
- Specified by:
visitLoadMetadata
in interfaceSSAInstruction.IVisitor
- Overrides:
visitLoadMetadata
in classSSAInstruction.Visitor
-
processClassInitializer
TODO: lift most of this logic to PropagationCallGraphBuilderAdd a call to the class initializer from the root method.
-