RFR: 8341697: C2: Register allocation inefficiency in tight loop [v7]

Quan Anh Mai qamai at openjdk.org
Wed May 28 15:25:13 UTC 2025


On Thu, 22 May 2025 14:46:16 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix uncommon_freq
>
> src/hotspot/share/opto/gcm.cpp line 2305:
> 
>> 2303:   }
>> 2304: }
>> 2305: 
> 
> Can you explain this removal?

It is incorrect, it should be `return this == b_loop`. However, I think it is redundant so I removed it altogether.

> src/hotspot/share/opto/reg_split.cpp line 522:
> 
>> 520:     Block* b = cfg.get_block(bidx);
>> 521:     if (!loop->in_loop_nest(b)) {
>> 522:       continue;
> 
> Is there not a more efficient way to iterate through all the loops in the loop nest?

We are iterating through all the blocks in the loop nest. There is probably a more straight-forward way.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21472#discussion_r2112179738
PR Review Comment: https://git.openjdk.org/jdk/pull/21472#discussion_r2112181961


More information about the hotspot-compiler-dev mailing list