RFR: 8256056: Deoptimization stub doesn't save vector registers on x86

Vladimir Kozlov kvn at openjdk.java.net
Tue Nov 10 00:43:58 UTC 2020


On Mon, 9 Nov 2020 18:59:30 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Deoptimization stub doesn't save vector registers on x86 and it may break vector rematerialization when a vector value (produced through Vector API) ends up in a register (and not spilled on stack).
> 
> The fix unconditionally saves all wide vector registers when going through deopt stub. If there are any performance concerns with that, it's possible to introduce a dedicated variant and choose between 2 versions when patching nmethods (like what happens with safepoint stubs). But deoptimization is already quite expensive to save much on that, so I decided to keep things as is.   
> 
> As a cleanup, I made `save_vectors` parameter explicit to make the intentions clearer.
> 
> Testing (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

We did record that compiled code has wide vectors.
May be we need specialized depot stub for 512 bits vectors

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

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


More information about the hotspot-compiler-dev mailing list