RFR: 8253734: C2: Optimize Move nodes [v2]

Nils Eliasson neliasso at openjdk.java.net
Fri Oct 23 12:42:40 UTC 2020


On Fri, 23 Oct 2020 11:10:51 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Introduce the following transformations for Move nodes: 
>> 1. `MoveI2F (MoveF2I x) => x`
>> 
>> 1. `MoveI2F (LoadI mem) => LoadF mem` 
>> 
>> 1. `StoreI mem (MoveF2I x) => StoreF mem x` 
>> 
>> (The same applies to MoveL2D/MoveD2L.)
>> 
>> №1 eliminates redundant operations and №2/№3 avoid reg-to-reg moves in generated code:
>> 0x000000010d09964c:   vmovss 0x20(%rsi),%xmm1
>> 0x000000010d099651:   vmovd  %xmm1,%eax                   ;*invokestatic floatToRawIntBits
>> vs
>> 0x0000000110c5a6cc:   mov    0x20(%rsi),%eax              ;*invokestatic floatToRawIntBits
>>  
>> 
>> (№2 and №3 are performed late (after loop opts are over) to avoid high-level optimizations passes to handle newly introduced mismatched accesses.)
>> 
>> Testing: tier1-5.
>
> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comments from Tobias.

Looks good!

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

Marked as reviewed by neliasso (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/826


More information about the hotspot-compiler-dev mailing list