Integrated: 8370251: C2: Inlining checks for method handle intrinsics are too strict

Vladimir Ivanov vlivanov at openjdk.org
Mon Oct 27 16:17:24 UTC 2025


On Mon, 20 Oct 2025 21:00:40 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> C2 performs access checks during inlining attempts through method handle
> intrinsic calls. But there are no such checks happening at runtime when
> executing the calls. (Access checks are performed when corresponding method
> handle is resolved.) So, inlining may fail due to access checks failure while
> the call always succeeds at runtime.
> 
> The fix is to skip access checks when inlining through method handle intrinsics.
> 
> Testing: hs-tier1 - hs-tier4

This pull request has now been integrated.

Changeset: 583ff202
Author:    Vladimir Ivanov <vlivanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/583ff202b1cc1f018d798a34d93359301840cf06
Stats:     137 lines in 2 files changed: 94 ins; 11 del; 32 mod

8370251: C2: Inlining checks for method handle intrinsics are too strict

Reviewed-by: kvn, roland

-------------

PR: https://git.openjdk.org/jdk/pull/27908


More information about the hotspot-compiler-dev mailing list