135135import com .oracle .graal .pointsto .util .CompletionExecutor .DebugContextRunnable ;
136136import com .oracle .svm .core .SubstrateOptions ;
137137import com .oracle .svm .core .SubstrateOptions .OptimizationLevel ;
138- import com .oracle .svm .core .annotate .AlwaysInlineAllCallees ;
139- import com .oracle .svm .core .annotate .AlwaysInlineSelectCallees ;
140138import com .oracle .svm .core .annotate .DeoptTest ;
141139import com .oracle .svm .core .annotate .NeverInlineTrivial ;
142140import com .oracle .svm .core .annotate .RestrictHeapAccess ;
@@ -711,7 +709,7 @@ private void doInlineTrivial(DebugContext debug, final HostedMethod method) {
711709 private boolean tryInlineTrivial (StructuredGraph graph , Invoke invoke , boolean firstInline ) {
712710 if (invoke .getInvokeKind ().isDirect ()) {
713711 HostedMethod singleCallee = (HostedMethod ) invoke .callTarget ().targetMethod ();
714- if (makeInlineDecision (invoke , singleCallee ) && InliningUtilities .recursionDepth (invoke , singleCallee ) == 0 ) {
712+ if (makeInlineDecision (singleCallee ) && InliningUtilities .recursionDepth (invoke , singleCallee ) == 0 ) {
715713 if (firstInline ) {
716714 graph .getDebug ().dump (DebugContext .DETAILED_LEVEL , graph , "Before inlining" );
717715 }
@@ -724,20 +722,16 @@ private boolean tryInlineTrivial(StructuredGraph graph, Invoke invoke, boolean f
724722 return false ;
725723 }
726724
727- private boolean makeInlineDecision (Invoke invoke , HostedMethod callee ) {
725+ private boolean makeInlineDecision (HostedMethod callee ) {
728726 if (!callee .canBeInlined () || callee .getAnnotation (NeverInlineTrivial .class ) != null ) {
729727 return false ;
730728 }
731- if (callee .shouldBeInlined () || callerAnnotatedWith ( invoke , AlwaysInlineAllCallees . class ) ) {
729+ if (callee .shouldBeInlined ()) {
732730 return true ;
733731 }
734732 if (optionAOTTrivialInline && callee .compilationInfo .isTrivialMethod ()) {
735733 return true ;
736734 }
737- AlwaysInlineSelectCallees selectCallees = getCallerAnnotation (invoke , AlwaysInlineSelectCallees .class );
738- if (selectCallees != null && Arrays .stream (selectCallees .callees ()).anyMatch (c -> c .equals (callee .getQualifiedName ()))) {
739- return true ;
740- }
741735 return false ;
742736 }
743737
0 commit comments