[lworld] RFR: 8228361: [lworld] Optimize the substitutability check in C2 [v2]

Christian Hagedorn chagedorn at openjdk.org
Thu Dec 18 12:59:40 UTC 2025


On Thu, 18 Dec 2025 10:17:02 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:
>> 
>>  - Merge branch 'lworld' into JDK-8228361
>>  - More refactoring, better comments
>>  - More comments, removing workaround
>>  - Merge
>>  - v5
>>  - Refactoring v4
>>  - Refactoring v3
>>  - Refactoring, more checks, new test
>>  - Merge branch 'lworld' into JDK-8228362
>>  - All tests pass
>>  - ... and 11 more: https://git.openjdk.org/valhalla/compare/3c41c2aa...4f8556c7
>
> src/hotspot/share/opto/callnode.cpp line 1189:
> 
>> 1187:     Node* left = in(TypeFunc::Parms);
>> 1188:     Node* right = in(TypeFunc::Parms + 1);
>> 1189:     if (!left->is_top() && !right->is_top() && (left->is_InlineType() || right->is_InlineType())) {
> 
> I think you can remove the `is_top()` checks since the `is_InlineType()` checks already cover that.
> 
> Suggestion:
> 
>     if (left->is_InlineType() || right->is_InlineType()) {

Scratch that, my suggestion is incorrect.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1823#discussion_r2630975062


More information about the valhalla-dev mailing list