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

Claes Redestad redestad at openjdk.java.net
Mon Nov 9 23:13:56 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

Looks OK - on my AVX=2-enabled test system the added overhead of the extra work during bootstrap is negligible (~16k instructions).

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

Marked as reviewed by redestad (Reviewer).

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


More information about the hotspot-compiler-dev mailing list