On Thu, 18 Dec 2025 07:31:30 GMT, Tobias Hartmann <[email protected]> wrote:

> C2 will now remove the slow call to 
> `ValueObjectMethods::isSubstitutable(Alt)` whenever it's able to determine 
> the layout of one of the operands. It will then emit code to directly compare 
> the fields.
> 
> This patch also contains an intrinsic for `_getFieldMap` that will be used by 
> the new core-libs implementation of the substitutability check 
> ([JDK-8370450](https://bugs.openjdk.org/browse/JDK-8370450)) that's used by 
> the interpreter / C1 and as a slow path in C2.
> 
> When browsing code, I marked a few rough edges in unrelated code for 
> follow-up cleanups with the corresponding bug numbers.
> 
> Testing: tier1-tier6 + valhalla-comp-stress
> 
> Thanks,
> Tobias

This pull request has now been integrated.

Changeset: b63e3bef
Author:    Tobias Hartmann <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/b63e3bef28559b26360b8bce2a90322a1fddcc85
Stats:     1506 lines in 30 files changed: 1269 ins; 106 del; 131 mod

8228361: [lworld] Optimize the substitutability check in C2

Reviewed-by: chagedorn, mhaessig

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

PR: https://git.openjdk.org/valhalla/pull/1823

Reply via email to