RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v9]

kuaiwei duke at openjdk.org
Mon Apr 28 03:25:55 UTC 2025


On Mon, 24 Mar 2025 11:42:35 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> kuaiwei has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
>> 
>>  - Merge remote-tracking branch 'origin/master' into dev/merge_loads
>>  - Fix test
>>  - Add more tests
>>  - Enable StressIGVN and riscv platform
>>  - Change tests as review comments
>>  - Fix test failure and change for review comments
>>  - Revert extract value and add more tests
>>  - Add tests
>>  - Fix test failure
>>  - Remove some debug trace
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/ee1577b7...e37c4bf3
>
> src/hotspot/share/opto/memnode.cpp line 2396:
> 
>> 2394:   assert(last_op != nullptr && (last_op->Opcode() == Op_OrI || last_op->Opcode() == Op_OrL), "sanity");
>> 2395:   _phase->is_IterGVN()->replace_node(last_op, replace);
>> 2396:   _phase->is_IterGVN()->_worklist.push(merged_load);
> 
> If you did this in `OrNode::Ideal`, then you just have to return the new load, and `IGVN` takes care of the replacing. That is the code pattern we use everywhere else.

The optimization has been moved to `OrNode::Ideal`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2062834641


More information about the hotspot-compiler-dev mailing list