RFR: 8253734: C2: Optimize Move nodes
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Oct 23 08:37:50 UTC 2020
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.
-------------
Commit messages:
- 8253734: Optimize Move nodes
Changes: https://git.openjdk.java.net/jdk/pull/826/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=826&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253734
Stats: 142 lines in 5 files changed: 127 ins; 0 del; 15 mod
Patch: https://git.openjdk.java.net/jdk/pull/826.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/826/head:pull/826
PR: https://git.openjdk.java.net/jdk/pull/826
More information about the hotspot-compiler-dev
mailing list