public interface InlineInvokePlugin extends GraphBuilderPlugin
before
and notifyAfterInline(jdk.internal.jvmci.meta.ResolvedJavaMethod)
the inlining, as well as of
non-inlined
invocations (i.e., those for which an Invoke
node
is created).Modifier and Type | Interface and Description |
---|---|
static class |
InlineInvokePlugin.InlineInfo
Result of a
inlining decision . |
Modifier and Type | Method and Description |
---|---|
default void |
notifyAfterInline(ResolvedJavaMethod methodToInline)
Notification that a method was inlined.
|
default void |
notifyBeforeInline(ResolvedJavaMethod methodToInline)
Notification that a method is about to be inlined.
|
default void |
notifyNotInlined(GraphBuilderContext b,
ResolvedJavaMethod method,
Invoke invoke)
Notifies this plugin of the
Invoke node created for a method that was not inlined per
shouldInlineInvoke(com.oracle.graal.graphbuilderconf.GraphBuilderContext, jdk.internal.jvmci.meta.ResolvedJavaMethod, com.oracle.graal.nodes.ValueNode[], jdk.internal.jvmci.meta.JavaType) . |
default InlineInvokePlugin.InlineInfo |
shouldInlineInvoke(GraphBuilderContext b,
ResolvedJavaMethod method,
ValueNode[] args,
JavaType returnType)
Determines whether a call to a given method is to be inlined.
|
default InlineInvokePlugin.InlineInfo shouldInlineInvoke(GraphBuilderContext b, ResolvedJavaMethod method, ValueNode[] args, JavaType returnType)
Non-null return value with a non-null method
: That
method
is inlined. Note that it can be a different
method than the one specified here as the parameter, which allows method substitutions.
Non-null return value with a null method
, e.g.,
InlineInvokePlugin.InlineInfo.DO_NOT_INLINE_WITH_EXCEPTION
: The method is not inlined, and other plugins
with a lower priority cannot overwrite this decision.
Null return value: This plugin made no decision, other plugins with a lower priority are asked.
b
- the contextmethod
- the target method of an invokeargs
- the arguments to the invokereturnType
- the return type derived from method
's signaturedefault void notifyBeforeInline(ResolvedJavaMethod methodToInline)
methodToInline
- the inlined methoddefault void notifyAfterInline(ResolvedJavaMethod methodToInline)
methodToInline
- the inlined methoddefault void notifyNotInlined(GraphBuilderContext b, ResolvedJavaMethod method, Invoke invoke)
Invoke
node created for a method that was not inlined per
shouldInlineInvoke(com.oracle.graal.graphbuilderconf.GraphBuilderContext, jdk.internal.jvmci.meta.ResolvedJavaMethod, com.oracle.graal.nodes.ValueNode[], jdk.internal.jvmci.meta.JavaType)
.b
- the contextmethod
- the method that was not inlinedinvoke
- the invoke node created for the call to method