public class DefaultAnalysisPolicy extends AnalysisPolicy
aliasArrayTypeFlows, allocationSiteSensitiveHeap, hybridStaticContext, limitObjectArrayLength, maxHeapContextDepth, maxObjectSetSize, options, relaxTypeFlowConstraints, removeSaturatedTypeFlows, typeFlowSaturationCutoff| Constructor and Description |
|---|
DefaultAnalysisPolicy(org.graalvm.compiler.options.OptionValues options) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addOriginalObserver(PointsToAnalysis bb,
TypeFlow<?> flow,
TypeFlow<?> observer) |
boolean |
addOriginalUse(PointsToAnalysis bb,
TypeFlow<?> flow,
TypeFlow<?> use) |
AnalysisContext |
allocationContext(PointsToAnalysis bb,
MethodFlowsGraph callerGraph) |
TypeState |
cloneState(PointsToAnalysis bb,
TypeState currentState,
TypeState inputState,
BytecodePosition cloneSite,
AnalysisContext allocationContext)
Create type state for clone.
|
ConstantTypeState |
constantTypeState(PointsToAnalysis bb,
JavaConstant constant,
AnalysisType exactType)
Wrap a constant into a type state abstraction.
|
ArrayElementsTypeStore |
createArrayElementsTypeStore(AnalysisObject object,
AnalysisUniverse universe) |
AnalysisObject |
createConstantObject(PointsToAnalysis bb,
JavaConstant constant,
AnalysisType exactType)
In the context-insensitive analysis, although we track constant values using the
ConstantTypeState, we don't track fields or array elements separately for constant
objects. |
InvokeTypeFlow |
createDeoptInvokeTypeFlow(BytecodePosition invokeLocation,
AnalysisType receiverType,
PointsToAnalysisMethod targetMethod,
TypeFlow<?>[] actualParameters,
ActualReturnTypeFlow actualReturn,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey) |
FieldTypeStore |
createFieldTypeStore(PointsToAnalysis bb,
AnalysisObject object,
AnalysisField field,
AnalysisUniverse universe) |
AnalysisObject |
createHeapObject(PointsToAnalysis bb,
AnalysisType type,
BytecodePosition allocationSite,
AnalysisContext allocationContext)
Create a heap allocated object abstraction.
|
MethodTypeFlow |
createMethodTypeFlow(PointsToAnalysisMethod method) |
AbstractSpecialInvokeTypeFlow |
createSpecialInvokeTypeFlow(BytecodePosition invokeLocation,
AnalysisType receiverType,
PointsToAnalysisMethod targetMethod,
TypeFlow<?>[] actualParameters,
ActualReturnTypeFlow actualReturn,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
Provides implementation for the special invoke type flow.
|
AbstractStaticInvokeTypeFlow |
createStaticInvokeTypeFlow(BytecodePosition invokeLocation,
AnalysisType receiverType,
PointsToAnalysisMethod targetMethod,
TypeFlow<?>[] actualParameters,
ActualReturnTypeFlow actualReturn,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
Provides implementation for the static invoke type flow.
|
AbstractVirtualInvokeTypeFlow |
createVirtualInvokeTypeFlow(BytecodePosition invokeLocation,
AnalysisType receiverType,
PointsToAnalysisMethod targetMethod,
TypeFlow<?>[] actualParameters,
ActualReturnTypeFlow actualReturn,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
Provides implementation for the virtual invoke type flow.
|
TypeState |
doIntersection(PointsToAnalysis bb,
MultiTypeState s1,
MultiTypeState s2) |
TypeState |
doIntersection(PointsToAnalysis bb,
MultiTypeState s1,
SingleTypeState s2) |
TypeState |
doSubtraction(PointsToAnalysis bb,
MultiTypeState s1,
MultiTypeState s2) |
TypeState |
doSubtraction(PointsToAnalysis bb,
MultiTypeState s1,
SingleTypeState s2) |
TypeState |
doUnion(PointsToAnalysis bb,
MultiTypeState s1,
MultiTypeState s2) |
TypeState |
doUnion(PointsToAnalysis bb,
MultiTypeState s1,
SingleTypeState state2) |
TypeState |
doUnion(PointsToAnalysis bb,
SingleTypeState state1,
SingleTypeState state2) |
TypeState |
dynamicNewInstanceState(PointsToAnalysis bb,
TypeState currentState,
TypeState newState,
BytecodePosition allocationSite,
AnalysisContext allocationContext)
Create type state for dynamic new instance.
|
TypeState |
forContextInsensitiveTypeState(PointsToAnalysis bb,
TypeState state)
Simplifies a type state by replacing all context sensitive objects with context insensitive
objects.
|
boolean |
isContextSensitiveAllocation(PointsToAnalysis bb,
AnalysisType type,
AnalysisContext allocationContext)
Specifies if an allocation site should be modeled context sensitively.
|
boolean |
isContextSensitiveAnalysis() |
boolean |
isMergingEnabled()
Check if merging is enabled.
|
boolean |
isSummaryObject(AnalysisObject object)
In some analysis policies some objects can summarize others.
|
void |
linkActualReturn(PointsToAnalysis bb,
boolean isStatic,
InvokeTypeFlow invoke) |
void |
linkClonedObjects(PointsToAnalysis bb,
TypeFlow<?> inputFlow,
CloneTypeFlow cloneFlow,
BytecodePosition source)
Link the elements of the cloned objects (array flows or field flows) to the elements of the
source objects.
|
MultiTypeState |
multiTypeState(PointsToAnalysis bb,
boolean canBeNull,
BitSet typesBitSet,
int typesCount,
AnalysisObject... objects) |
boolean |
needsConstantCache()
Specifies if this policy models constants objects context sensitively, i.e., by creating a
different abstraction for each JavaConstant of the same type, and thus needs a constants
cache.
|
void |
noteMerge(PointsToAnalysis bb,
AnalysisObject... a)
Note analysis object state merge.
|
void |
noteMerge(PointsToAnalysis bb,
AnalysisObject a)
Note analysis object state merge.
|
void |
noteMerge(PointsToAnalysis bb,
TypeState t)
Note type state merge.
|
void |
processArrayCopyStates(PointsToAnalysis bb,
TypeState srcArrayState,
TypeState dstArrayState) |
TypeFlow<?> |
proxy(BytecodePosition source,
TypeFlow<?> input) |
void |
registerAsImplementationInvoked(InvokeTypeFlow invoke,
PointsToAnalysisMethod method) |
SingleTypeState |
singleTypeState(PointsToAnalysis bb,
boolean canBeNull,
AnalysisType type,
AnalysisObject... objects) |
MethodFlowsGraphInfo |
staticRootMethodGraph(PointsToAnalysis bb,
PointsToAnalysisMethod method) |
aliasArrayTypeFlows, allocationSiteSensitiveHeap, areTypesCompatibleForSystemArraycopy, doIntersection, doIntersection, doSubtraction, doSubtraction, limitObjectArrayLength, maxObjectSetSize, relaxTypeFlowConstraints, removeSaturatedTypeFlows, typeFlowSaturationCutoff, useHybridStaticContextpublic DefaultAnalysisPolicy(org.graalvm.compiler.options.OptionValues options)
public boolean isContextSensitiveAnalysis()
isContextSensitiveAnalysis in class AnalysisPolicypublic MethodTypeFlow createMethodTypeFlow(PointsToAnalysisMethod method)
createMethodTypeFlow in class AnalysisPolicypublic boolean needsConstantCache()
AnalysisPolicyneedsConstantCache in class AnalysisPolicypublic boolean isSummaryObject(AnalysisObject object)
AnalysisPolicyisSummaryObject in class AnalysisPolicypublic boolean isMergingEnabled()
AnalysisPolicyisMergingEnabled in class AnalysisPolicypublic void noteMerge(PointsToAnalysis bb, TypeState t)
AnalysisPolicynoteMerge in class AnalysisPolicypublic void noteMerge(PointsToAnalysis bb, AnalysisObject... a)
AnalysisPolicynoteMerge in class AnalysisPolicypublic void noteMerge(PointsToAnalysis bb, AnalysisObject a)
AnalysisPolicynoteMerge in class AnalysisPolicypublic boolean isContextSensitiveAllocation(PointsToAnalysis bb, AnalysisType type, AnalysisContext allocationContext)
AnalysisPolicyisContextSensitiveAllocation in class AnalysisPolicypublic AnalysisObject createHeapObject(PointsToAnalysis bb, AnalysisType type, BytecodePosition allocationSite, AnalysisContext allocationContext)
AnalysisPolicycreateHeapObject in class AnalysisPolicypublic AnalysisObject createConstantObject(PointsToAnalysis bb, JavaConstant constant, AnalysisType exactType)
ConstantTypeState, we don't track fields or array elements separately for constant
objects. The field and array flows used for load/store operations of a "constant" are shared
with the context-insensitive object of its declared type. See also ConstantTypeState.createConstantObject in class AnalysisPolicypublic ConstantTypeState constantTypeState(PointsToAnalysis bb, JavaConstant constant, AnalysisType exactType)
AnalysisPolicyconstantTypeState in class AnalysisPolicypublic TypeState dynamicNewInstanceState(PointsToAnalysis bb, TypeState currentState, TypeState newState, BytecodePosition allocationSite, AnalysisContext allocationContext)
AnalysisPolicydynamicNewInstanceState in class AnalysisPolicypublic TypeState cloneState(PointsToAnalysis bb, TypeState currentState, TypeState inputState, BytecodePosition cloneSite, AnalysisContext allocationContext)
AnalysisPolicycloneState in class AnalysisPolicypublic void linkClonedObjects(PointsToAnalysis bb, TypeFlow<?> inputFlow, CloneTypeFlow cloneFlow, BytecodePosition source)
AnalysisPolicylinkClonedObjects in class AnalysisPolicypublic FieldTypeStore createFieldTypeStore(PointsToAnalysis bb, AnalysisObject object, AnalysisField field, AnalysisUniverse universe)
createFieldTypeStore in class AnalysisPolicypublic ArrayElementsTypeStore createArrayElementsTypeStore(AnalysisObject object, AnalysisUniverse universe)
createArrayElementsTypeStore in class AnalysisPolicypublic AbstractVirtualInvokeTypeFlow createVirtualInvokeTypeFlow(BytecodePosition invokeLocation, AnalysisType receiverType, PointsToAnalysisMethod targetMethod, TypeFlow<?>[] actualParameters, ActualReturnTypeFlow actualReturn, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
AnalysisPolicycreateVirtualInvokeTypeFlow in class AnalysisPolicypublic AbstractSpecialInvokeTypeFlow createSpecialInvokeTypeFlow(BytecodePosition invokeLocation, AnalysisType receiverType, PointsToAnalysisMethod targetMethod, TypeFlow<?>[] actualParameters, ActualReturnTypeFlow actualReturn, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
AnalysisPolicycreateSpecialInvokeTypeFlow in class AnalysisPolicypublic AbstractStaticInvokeTypeFlow createStaticInvokeTypeFlow(BytecodePosition invokeLocation, AnalysisType receiverType, PointsToAnalysisMethod targetMethod, TypeFlow<?>[] actualParameters, ActualReturnTypeFlow actualReturn, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
AnalysisPolicycreateStaticInvokeTypeFlow in class AnalysisPolicypublic InvokeTypeFlow createDeoptInvokeTypeFlow(BytecodePosition invokeLocation, AnalysisType receiverType, PointsToAnalysisMethod targetMethod, TypeFlow<?>[] actualParameters, ActualReturnTypeFlow actualReturn, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey callerMultiMethodKey)
createDeoptInvokeTypeFlow in class AnalysisPolicypublic MethodFlowsGraphInfo staticRootMethodGraph(PointsToAnalysis bb, PointsToAnalysisMethod method)
staticRootMethodGraph in class AnalysisPolicypublic AnalysisContext allocationContext(PointsToAnalysis bb, MethodFlowsGraph callerGraph)
allocationContext in class AnalysisPolicypublic TypeFlow<?> proxy(BytecodePosition source, TypeFlow<?> input)
proxy in class AnalysisPolicypublic boolean addOriginalUse(PointsToAnalysis bb, TypeFlow<?> flow, TypeFlow<?> use)
addOriginalUse in class AnalysisPolicypublic boolean addOriginalObserver(PointsToAnalysis bb, TypeFlow<?> flow, TypeFlow<?> observer)
addOriginalObserver in class AnalysisPolicypublic void linkActualReturn(PointsToAnalysis bb, boolean isStatic, InvokeTypeFlow invoke)
linkActualReturn in class AnalysisPolicypublic void registerAsImplementationInvoked(InvokeTypeFlow invoke, PointsToAnalysisMethod method)
registerAsImplementationInvoked in class AnalysisPolicypublic TypeState forContextInsensitiveTypeState(PointsToAnalysis bb, TypeState state)
AnalysisPolicyforContextInsensitiveTypeState in class AnalysisPolicypublic SingleTypeState singleTypeState(PointsToAnalysis bb, boolean canBeNull, AnalysisType type, AnalysisObject... objects)
singleTypeState in class AnalysisPolicypublic MultiTypeState multiTypeState(PointsToAnalysis bb, boolean canBeNull, BitSet typesBitSet, int typesCount, AnalysisObject... objects)
multiTypeState in class AnalysisPolicypublic TypeState doUnion(PointsToAnalysis bb, SingleTypeState state1, SingleTypeState state2)
doUnion in class AnalysisPolicypublic TypeState doUnion(PointsToAnalysis bb, MultiTypeState s1, SingleTypeState state2)
doUnion in class AnalysisPolicypublic TypeState doUnion(PointsToAnalysis bb, MultiTypeState s1, MultiTypeState s2)
doUnion in class AnalysisPolicypublic TypeState doIntersection(PointsToAnalysis bb, MultiTypeState s1, SingleTypeState s2)
doIntersection in class AnalysisPolicypublic TypeState doIntersection(PointsToAnalysis bb, MultiTypeState s1, MultiTypeState s2)
doIntersection in class AnalysisPolicypublic TypeState doSubtraction(PointsToAnalysis bb, MultiTypeState s1, SingleTypeState s2)
doSubtraction in class AnalysisPolicypublic TypeState doSubtraction(PointsToAnalysis bb, MultiTypeState s1, MultiTypeState s2)
doSubtraction in class AnalysisPolicypublic void processArrayCopyStates(PointsToAnalysis bb, TypeState srcArrayState, TypeState dstArrayState)
processArrayCopyStates in class AnalysisPolicy