RFR: 8020282: Generated code quality: redundant LEAs in the chained dereferences [v8]

Vladimir Kozlov kvn at openjdk.org
Wed Jun 18 16:59:37 UTC 2025


On Wed, 18 Jun 2025 16:54:15 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Manuel Hässig has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Simplify and explain scenarios
>>  - Simplify tests further
>>  - Remove empty line
>
> src/hotspot/cpu/x86/peephole_x86_64.cpp line 359:
> 
>> 357: 
>> 358:   // Remove spill for the decode if the spill node does not have any other uses.
>> 359:   if (is_spill && decode_spill->outcnt() == 1 && block->contains(decode_spill)) {
> 
> You can rearrange this to avoid forward declaration of `decode_spill`:
> 
> 
>   if (is_spill) {
>     MachNode* decode_spill = decode->in(1)->as_Mach();
>     If (decode_spill->outcnt() == 1 && block->contains(decode_spill)) {

Or you concern that inputs of `decode` could be modified and you cached it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25471#discussion_r2155096769


More information about the hotspot-compiler-dev mailing list