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
Nested ClassesModifier and TypeClassDescriptionclassprotected static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ISSABasicBlockThe basic block currently being processedprotected final SSAPropagationCallGraphBuilderThe governing call graph builder.protected final DefUseDef-use informationprotected final IRViewThe governing IRprotected final CGNodeThe node whose statements we are currently traversingprotected final SymbolTableGoverning symbol tableprotected final PropagationSystemThe governing propagation system, into which constraints are added -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancontentsAreInvariant(SymbolTable symbolTable, DefUse du, int valueNumber) protected booleancontentsAreInvariant(SymbolTable symbolTable, DefUse du, int[] valueNumber) protected voiddoVisitArrayLoad(int def, int arrayRef) voiddoVisitArrayStore(int arrayRef, int value) protected IAnalysisCacheViewprotected SSAPropagationCallGraphBuilderprotected IClassHierarchygetFilteredPointerKeyForLocal(int valueNumber, FilteredPointerKey.TypeFilter filter) getInstanceKeyForAllocation(NewSiteReference allocation) getInstanceKeyForClassObject(Object obj, TypeReference type) <T> InstanceKeygetInstanceKeyForMultiNewArray(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 AnalysisOptionsgetPointerKeyForLocal(int valueNumber) getTargetForCall(CGNode caller, CallSiteReference site, IClass recv, InstanceKey[] iKey) protected booleanhasNoInterestingUses(int vn) protected booleanisRootType(IClass klass) protected voidprocessClassInitializer(IClass klass) TODO: lift most of this logic to PropagationCallGraphBuildervoidprocessPutField(int rval, int ref, IField f) protected voidprocessPutStatic(int rval, FieldReference field, IField f) voidsetBasicBlock(ISSABasicBlock block) The calling loop must call this in each iteration!voidvisitArrayLoad(SSAArrayLoadInstruction instruction) voidvisitArrayStore(SSAArrayStoreInstruction instruction) voidvisitCheckCast(SSACheckCastInstruction instruction) voidvisitGet(SSAGetInstruction instruction) voidvisitGetCaughtException(SSAGetCaughtExceptionInstruction instruction) protected voidvisitGetInternal(int lval, int ref, boolean isStatic, FieldReference field) voidvisitInvoke(SSAInvokeInstruction instruction) protected voidvisitInvokeInternal(SSAAbstractInvokeInstruction instruction, SSAPropagationCallGraphBuilder.ConstraintVisitor.InvariantComputer invs) voidvisitLoadMetadata(SSALoadMetadataInstruction instruction) voidvisitNew(SSANewInstruction instruction) voidvisitPhi(SSAPhiInstruction instruction) voidvisitPi(SSAPiInstruction instruction) voidvisitPut(SSAPutInstruction instruction) voidvisitPutInternal(int rval, int ref, boolean isStatic, FieldReference field) voidvisitReturn(SSAReturnInstruction instruction) voidvisitThrow(SSAThrowInstruction instruction) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SSAInstruction.IVisitor
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
-
doVisitArrayLoad
protected void doVisitArrayLoad(int def, int arrayRef) -
doVisitArrayStore
public void doVisitArrayStore(int arrayRef, int value) - See Also:
-
visitArrayStore
-
visitCheckCast
-
visitReturn
-
visitGet
-
visitGetInternal
-
visitPut
-
visitPutInternal
-
processPutField
-
processPutStatic
-
visitInvoke
-
visitInvokeInternal
protected void visitInvokeInternal(SSAAbstractInvokeInstruction instruction, SSAPropagationCallGraphBuilder.ConstraintVisitor.InvariantComputer invs) -
visitNew
-
visitThrow
-
visitGetCaughtException
-
visitPhi
-
visitPi
-
getBasicBlock
-
setBasicBlock
The calling loop must call this in each iteration! -
visitLoadMetadata
-
processClassInitializer
TODO: lift most of this logic to PropagationCallGraphBuilderAdd a call to the class initializer from the root method.
-