Integrated: 8256058: Improve vector register handling in RegisterMap::pd_location() on x86
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Nov 20 21:18:06 UTC 2020
On Mon, 9 Nov 2020 16:54:56 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> `RegisterMap` handles registers on a per-slot basis: every register is split into slot-sized (32-bit) parts that are tracked independently. On x86 vector registers are up to 512-bit in size and occupy up to 16 slots. In order to save on constructing RegisterMaps, `RegisterMap`s are sparsely populated: location of the first slot is recorded and the rest is derived from it and `RegisterMap::pd_location()` is used to compute the address of a particular slot if it is missing in the map.
>
> As I mentioned in #1131, frame layout for vector registers is quite complicated: ZMM0-15 are split in 3 parts (2 x 128-bit + 1 x 256-bit) when saved while ZMM16-31 are stored in full.
>
> Proposed patch reifies those details in `RegisterMap::pd_location()` logic and it becomes possible to initialize just 3 slot locations for ZMM0-15 to be able to recover every slot location inside the register while for ZMM16-31 initializing a single (base) slot is enough.
>
> Testing (along with some other relevant patches):
> - [x] jdk/incubator/vector w/ -XX:+DeoptimizeALot and -XX:UseAVX=3 on AVX512-capable hardware
> - [x] hs-precheckin-comp, hs-tier1, hs-tier2
This pull request has now been integrated.
Changeset: e6fa85b4
Author: Vladimir Ivanov <vlivanov at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/e6fa85b4
Stats: 35 lines in 1 file changed: 19 ins; 7 del; 9 mod
8256058: Improve vector register handling in RegisterMap::pd_location() on x86
Reviewed-by: kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/1132
More information about the hotspot-compiler-dev
mailing list