public class InlineBeforeAnalysisPolicy<S extends InlineBeforeAnalysisPolicy.Scope> extends Object
InlineBeforeAnalysis
. If
InlineBeforeAnalysisPolicy.shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext, jdk.vm.ci.meta.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.processNode(S, org.graalvm.compiler.graph.Node)
returns
true, inlining is continued. If InlineBeforeAnalysisPolicy.processNode(S, org.graalvm.compiler.graph.Node)
returns false, the inlining is
aborted
. If InlineBeforeAnalysisPolicy.processNode(S, org.graalvm.compiler.graph.Node)
returns true for all nodes of the
callee, the inlining is committed
.Modifier and Type | Class and Description |
---|---|
static interface |
InlineBeforeAnalysisPolicy.Scope
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<InlineBeforeAnalysisPolicy.Scope> |
NO_INLINING |
Modifier | Constructor and Description |
---|---|
protected |
InlineBeforeAnalysisPolicy() |
Modifier and Type | Method and Description |
---|---|
protected void |
abortCalleeScope(S outer,
S callee) |
protected void |
commitCalleeScope(S outer,
S callee) |
protected S |
createTopScope() |
protected S |
openCalleeScope(S outer) |
protected boolean |
processNode(S scope,
org.graalvm.compiler.graph.Node node)
Invoked for each node of the callee during graph decoding.
|
protected boolean |
shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b,
jdk.vm.ci.meta.ResolvedJavaMethod method,
org.graalvm.compiler.nodes.ValueNode[] args) |
public static final InlineBeforeAnalysisPolicy<InlineBeforeAnalysisPolicy.Scope> NO_INLINING
protected boolean shouldInlineInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b, jdk.vm.ci.meta.ResolvedJavaMethod method, org.graalvm.compiler.nodes.ValueNode[] args)
protected S createTopScope()
protected boolean processNode(S scope, org.graalvm.compiler.graph.Node node)