public class MethodTypeFlowBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
MethodTypeFlowBuilder.TypeFlowsOfNodes
Fixed point analysis state.
|
| Modifier and Type | Field and Description |
|---|---|
protected PointsToAnalysis |
bb |
protected MethodFlowsGraph |
flowsGraph |
protected org.graalvm.compiler.nodes.StructuredGraph |
graph |
protected PointsToAnalysisMethod |
method |
protected List<TypeFlow<?>> |
postInitFlows |
protected TypeFlowGraphBuilder |
typeFlowGraphBuilder |
| Constructor and Description |
|---|
MethodTypeFlowBuilder(PointsToAnalysis bb,
PointsToAnalysisMethod method,
MethodFlowsGraph flowsGraph,
MethodFlowsGraph.GraphKind graphKind) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply(boolean forceReparse,
Object reason) |
protected void |
checkUnsafeOffset(org.graalvm.compiler.nodes.ValueNode base,
org.graalvm.compiler.nodes.ValueNode offset)
Hook for unsafe offset value checks.
|
protected boolean |
delegateNodeProcessing(org.graalvm.compiler.nodes.FixedNode n,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected static boolean |
ignoreConstant(PointsToAnalysis bb,
org.graalvm.compiler.nodes.ConstantNode cn)
This method filters constants, i.e., these constants are not seen as reachable on its own.
|
protected static boolean |
ignoreInstanceOfType(PointsToAnalysis bb,
AnalysisType type) |
protected void |
processCommitAllocation(org.graalvm.compiler.nodes.virtual.CommitAllocationNode commitAllocationNode,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected void |
processMacroInvokable(MethodTypeFlowBuilder.TypeFlowsOfNodes state,
org.graalvm.compiler.replacements.nodes.MacroInvokable macro,
boolean installResult) |
protected void |
processMethodInvocation(MethodTypeFlowBuilder.TypeFlowsOfNodes state,
org.graalvm.compiler.nodes.Invoke invoke,
org.graalvm.compiler.nodes.CallTargetNode.InvokeKind invokeKind,
PointsToAnalysisMethod targetMethod,
org.graalvm.compiler.graph.NodeInputList<org.graalvm.compiler.nodes.ValueNode> arguments) |
protected void |
processMethodInvocation(MethodTypeFlowBuilder.TypeFlowsOfNodes state,
org.graalvm.compiler.nodes.ValueNode invoke,
org.graalvm.compiler.nodes.CallTargetNode.InvokeKind invokeKind,
PointsToAnalysisMethod targetMethod,
org.graalvm.compiler.graph.NodeInputList<org.graalvm.compiler.nodes.ValueNode> arguments,
boolean installResult,
BytecodePosition invokeLocation,
boolean createDeoptInvokeTypeFlow) |
protected void |
processNewArray(org.graalvm.compiler.nodes.java.NewArrayNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected void |
processNewInstance(org.graalvm.compiler.nodes.java.NewInstanceNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected void |
processNewInstance(org.graalvm.compiler.nodes.ValueNode node,
AnalysisType type,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected void |
processStoreField(org.graalvm.compiler.nodes.java.StoreFieldNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected void |
processStoreField(org.graalvm.compiler.nodes.ValueNode node,
AnalysisField field,
org.graalvm.compiler.nodes.ValueNode object,
org.graalvm.compiler.nodes.ValueNode value,
MethodTypeFlowBuilder.TypeFlowsOfNodes state) |
protected static void |
registerUsedElements(PointsToAnalysis bb,
org.graalvm.compiler.nodes.StructuredGraph graph,
boolean registerEmbeddedRoots) |
protected org.graalvm.compiler.nodes.ValueNode |
typeFlowUnproxify(org.graalvm.compiler.nodes.ValueNode value)
Within typeflow graphs we unproxify values and instead filter types via our typeflows.
|
protected final PointsToAnalysis bb
protected final MethodFlowsGraph flowsGraph
protected final PointsToAnalysisMethod method
protected org.graalvm.compiler.nodes.StructuredGraph graph
protected final TypeFlowGraphBuilder typeFlowGraphBuilder
public MethodTypeFlowBuilder(PointsToAnalysis bb, PointsToAnalysisMethod method, MethodFlowsGraph flowsGraph, MethodFlowsGraph.GraphKind graphKind)
protected static void registerUsedElements(PointsToAnalysis bb, org.graalvm.compiler.nodes.StructuredGraph graph, boolean registerEmbeddedRoots)
protected static boolean ignoreConstant(PointsToAnalysis bb, org.graalvm.compiler.nodes.ConstantNode cn)
StrengthenGraphs must have a corresponding re-write of the
constant in case nothing else in the application made that constant reachable.
Class.isAssignableFrom(java.lang.Class<?>) is often used with a constant receiver class. In that case, we
do not want to make the receiver class reachable, because as long as the receiver class is
not reachable for any other "real" reason we know that isAssignableFrom will always return
false. So in StrengthenGraphs we can then constant-fold the
ClassIsAssignableFromNode to false.
Similarly, a class should not be marked as reachable only so that we can add the class name
to the error message of a ClassCastException. In StrengthenGraphs we can
re-write the Class constant to a String constant, i.e., only embed the class name and not the
full java.lang.Class object in the image.protected static boolean ignoreInstanceOfType(PointsToAnalysis bb, AnalysisType type)
protected org.graalvm.compiler.nodes.ValueNode typeFlowUnproxify(org.graalvm.compiler.nodes.ValueNode value)
LimitedValueProxys, as opposed to merely
ValueProxys, as it is necessary to see through DeoptProxies. The precautionary
measures needed for DeoptProxies are accounted for via method linking.protected void apply(boolean forceReparse,
Object reason)
protected boolean delegateNodeProcessing(org.graalvm.compiler.nodes.FixedNode n,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processMacroInvokable(MethodTypeFlowBuilder.TypeFlowsOfNodes state, org.graalvm.compiler.replacements.nodes.MacroInvokable macro, boolean installResult)
protected void processMethodInvocation(MethodTypeFlowBuilder.TypeFlowsOfNodes state, org.graalvm.compiler.nodes.Invoke invoke, org.graalvm.compiler.nodes.CallTargetNode.InvokeKind invokeKind, PointsToAnalysisMethod targetMethod, org.graalvm.compiler.graph.NodeInputList<org.graalvm.compiler.nodes.ValueNode> arguments)
protected void processMethodInvocation(MethodTypeFlowBuilder.TypeFlowsOfNodes state, org.graalvm.compiler.nodes.ValueNode invoke, org.graalvm.compiler.nodes.CallTargetNode.InvokeKind invokeKind, PointsToAnalysisMethod targetMethod, org.graalvm.compiler.graph.NodeInputList<org.graalvm.compiler.nodes.ValueNode> arguments, boolean installResult, BytecodePosition invokeLocation, boolean createDeoptInvokeTypeFlow)
protected void processCommitAllocation(org.graalvm.compiler.nodes.virtual.CommitAllocationNode commitAllocationNode,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processNewInstance(org.graalvm.compiler.nodes.java.NewInstanceNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processNewArray(org.graalvm.compiler.nodes.java.NewArrayNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processNewInstance(org.graalvm.compiler.nodes.ValueNode node,
AnalysisType type,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processStoreField(org.graalvm.compiler.nodes.java.StoreFieldNode node,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void processStoreField(org.graalvm.compiler.nodes.ValueNode node,
AnalysisField field,
org.graalvm.compiler.nodes.ValueNode object,
org.graalvm.compiler.nodes.ValueNode value,
MethodTypeFlowBuilder.TypeFlowsOfNodes state)
protected void checkUnsafeOffset(org.graalvm.compiler.nodes.ValueNode base,
org.graalvm.compiler.nodes.ValueNode offset)