RFR: JDK-8316991: Reduce nullable allocation merges [v9]
Vladimir Kozlov
kvn at openjdk.org
Wed Mar 27 17:58:25 UTC 2024
On Tue, 26 Mar 2024 20:51:33 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Cesar Soares Lucas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
>>
>> - Merge remote-tracking branch 'origin/master' into ram-nullables
>> - Catching up with master
>> - Fix broken build.
>> - Merge with origin/master
>> - Update test/micro/org/openjdk/bench/vm/compiler/AllocationMerges.java
>>
>> Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
>> - Ammend previous fix & add repro tests.
>> - Fix to prevent reducing already reduced Phi
>> - Fix to prevent creating NULL ConNKlass constants.
>> - Refrain from RAM of arrays and Phis controlled by Loop nodes.
>> - Fix typo in test.
>> - ... and 3 more: https://git.openjdk.org/jdk/compare/89e0889a...3129378f
>
> src/hotspot/share/opto/escape.cpp line 472:
>
>> 470:
>> 471: // Don't handle arrays.
>> 472: if (alloc->Opcode() != Op_Allocate) {
>
> Turn it into `alloc->Opcode() == Op_AllocateArray` or put `assert(alloc->Opcode() == Op_AllocateArray, "")` inside the branch.
I suggest to add assert inside branch to catch the case when we add an other Allocate subclass.
Also `ptn->ideal_node()->is_Allocate()` check at the line 468 is not needed because `as_Allocate()` has such assert check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15825#discussion_r1541592986
More information about the hotspot-dev
mailing list