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

kuaiwei duke at openjdk.org
Tue May 13 09:36:58 UTC 2025


On Fri, 2 May 2025 09:50:35 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix build error on mac and windows
>
> src/hotspot/share/opto/addnode.cpp line 1041:
> 
>> 1039:   Node* oper = _combine;
>> 1040:   NOT_PRODUCT(int steps = 0;)    // prevent dead loop in bad graph
>> 1041:   while (load == nullptr NOT_PRODUCT(&& steps < 30)) {
> 
> And just saw this when flying by.
> What "bad graph" is this? What is the "dead loop" here?
> What happens in product, since there you don't have this check?

It should not enter a dead loop if we go up with the combine operators. Except there's an invalid graph which child node use ancestor nodes. I didn't see this 'bad graph' in my tests. The code is like an assertion in debug mode.

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

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


More information about the hotspot-compiler-dev mailing list