Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@
import com.oracle.graal.pointsto.util.CompletionExecutor.DebugContextRunnable;
import com.oracle.svm.core.SubstrateOptions;
import com.oracle.svm.core.SubstrateOptions.OptimizationLevel;
import com.oracle.svm.core.annotate.AlwaysInlineAllCallees;
import com.oracle.svm.core.annotate.AlwaysInlineSelectCallees;
import com.oracle.svm.core.annotate.DeoptTest;
import com.oracle.svm.core.annotate.NeverInlineTrivial;
import com.oracle.svm.core.annotate.RestrictHeapAccess;
Expand Down Expand Up @@ -711,7 +709,7 @@ private void doInlineTrivial(DebugContext debug, final HostedMethod method) {
private boolean tryInlineTrivial(StructuredGraph graph, Invoke invoke, boolean firstInline) {
if (invoke.getInvokeKind().isDirect()) {
HostedMethod singleCallee = (HostedMethod) invoke.callTarget().targetMethod();
if (makeInlineDecision(invoke, singleCallee) && InliningUtilities.recursionDepth(invoke, singleCallee) == 0) {
if (makeInlineDecision(singleCallee) && InliningUtilities.recursionDepth(invoke, singleCallee) == 0) {
if (firstInline) {
graph.getDebug().dump(DebugContext.DETAILED_LEVEL, graph, "Before inlining");
}
Expand All @@ -724,20 +722,16 @@ private boolean tryInlineTrivial(StructuredGraph graph, Invoke invoke, boolean f
return false;
}

private boolean makeInlineDecision(Invoke invoke, HostedMethod callee) {
private boolean makeInlineDecision(HostedMethod callee) {
if (!callee.canBeInlined() || callee.getAnnotation(NeverInlineTrivial.class) != null) {
return false;
}
if (callee.shouldBeInlined() || callerAnnotatedWith(invoke, AlwaysInlineAllCallees.class)) {
if (callee.shouldBeInlined()) {
return true;
}
if (optionAOTTrivialInline && callee.compilationInfo.isTrivialMethod()) {
return true;
}
AlwaysInlineSelectCallees selectCallees = getCallerAnnotation(invoke, AlwaysInlineSelectCallees.class);
if (selectCallees != null && Arrays.stream(selectCallees.callees()).anyMatch(c -> c.equals(callee.getQualifiedName()))) {
return true;
}
return false;
}

Expand Down