RFR: 8302172: [JVMCI] HotSpotResolvedJavaMethodImpl.canBeInlined must respect @ForceInline
Doug Simon
dnsimon at openjdk.org
Fri Feb 10 08:15:49 UTC 2023
On Fri, 10 Feb 2023 00:24:42 GMT, Dean Long <dlong at openjdk.org> wrote:
>> The implementation of `HotSpotResolvedJavaMethodImpl.canBeInlined` must return true for a method annotated with `@ForceInline`.
>
> src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java line 582:
>
>> 580: if (isForceInline()) {
>> 581: return true;
>> 582: }
>
> Should this use shouldBeInlined() instead? Would it make sense for shouldBeInlined() to return true but canBeInlined() returns false?
Yes as `shouldBeInlined` boils down to calling `CompilerOracle::should_inline` which can return true even if `Method::is_not_compilable` returns false.
-------------
PR: https://git.openjdk.org/jdk/pull/12501
More information about the hotspot-compiler-dev
mailing list