public abstract class InlineBeforeAnalysisPolicy extends Object
InlineBeforeAnalysis. If
InlineBeforeAnalysisPolicy.shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext, ResolvedJavaMethod, org.graalvm.compiler.nodes.ValueNode[]) returns true for an invocation, the graph decoding goes into callees
and starts decoding. A new scope is opened for each callee so that the
policy implementation can track each inlined method. As long as
InlineBeforeAnalysisPolicy.AbstractPolicyScope.processNode(com.oracle.graal.pointsto.meta.AnalysisMetaAccess, ResolvedJavaMethod, org.graalvm.compiler.graph.Node) returns true, inlining is continued. If
InlineBeforeAnalysisPolicy.AbstractPolicyScope.processNode(com.oracle.graal.pointsto.meta.AnalysisMetaAccess, ResolvedJavaMethod, org.graalvm.compiler.graph.Node) returns false, the inlining is
aborted. If InlineBeforeAnalysisPolicy.AbstractPolicyScope.processNode(com.oracle.graal.pointsto.meta.AnalysisMetaAccess, ResolvedJavaMethod, org.graalvm.compiler.graph.Node)
returns true for all nodes of the callee, the inlining is
committed.| Modifier and Type | Class and Description |
|---|---|
static class |
InlineBeforeAnalysisPolicy.AbstractPolicyScope
A place for policy implementations to store per-callee information like the number of nodes
seen in the callee.
|
| Modifier and Type | Field and Description |
|---|---|
static InlineBeforeAnalysisPolicy |
NO_INLINING |
protected org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin[] |
nodePlugins |
| Modifier | Constructor and Description |
|---|---|
protected |
InlineBeforeAnalysisPolicy(org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin[] nodePlugins) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin.InlineInfo |
createInvokeInfo(ResolvedJavaMethod method) |
protected abstract InlineBeforeAnalysisPolicy.AbstractPolicyScope |
createRootScope() |
protected abstract boolean |
needsExplicitExceptions() |
protected abstract InlineBeforeAnalysisPolicy.AbstractPolicyScope |
openCalleeScope(InlineBeforeAnalysisPolicy.AbstractPolicyScope outer,
AnalysisMetaAccess metaAccess,
ResolvedJavaMethod method,
boolean[] constArgsWithReceiver,
boolean intrinsifiedMethodHandle) |
protected abstract org.graalvm.compiler.nodes.FixedWithNextNode |
processInvokeArgs(ResolvedJavaMethod targetMethod,
org.graalvm.compiler.nodes.FixedWithNextNode insertionPoint,
org.graalvm.compiler.nodes.ValueNode[] arguments) |
protected abstract boolean |
shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b,
ResolvedJavaMethod method,
org.graalvm.compiler.nodes.ValueNode[] args) |
protected boolean |
shouldOmitIntermediateMethodInState(ResolvedJavaMethod method) |
protected abstract boolean |
tryInvocationPlugins() |
protected final org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin[] nodePlugins
public static final InlineBeforeAnalysisPolicy NO_INLINING
protected InlineBeforeAnalysisPolicy(org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin[] nodePlugins)
protected abstract boolean shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b,
ResolvedJavaMethod method,
org.graalvm.compiler.nodes.ValueNode[] args)
protected abstract org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin.InlineInfo createInvokeInfo(ResolvedJavaMethod method)
protected abstract boolean needsExplicitExceptions()
protected abstract boolean tryInvocationPlugins()
protected abstract org.graalvm.compiler.nodes.FixedWithNextNode processInvokeArgs(ResolvedJavaMethod targetMethod,
org.graalvm.compiler.nodes.FixedWithNextNode insertionPoint,
org.graalvm.compiler.nodes.ValueNode[] arguments)
protected abstract InlineBeforeAnalysisPolicy.AbstractPolicyScope createRootScope()
protected abstract InlineBeforeAnalysisPolicy.AbstractPolicyScope openCalleeScope(InlineBeforeAnalysisPolicy.AbstractPolicyScope outer, AnalysisMetaAccess metaAccess, ResolvedJavaMethod method, boolean[] constArgsWithReceiver, boolean intrinsifiedMethodHandle)
protected boolean shouldOmitIntermediateMethodInState(ResolvedJavaMethod method)