RFR: 8262355: Support for AVX-512 opmask register allocation. [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Mar 5 16:04:27 UTC 2021
On Fri, 5 Mar 2021 10:00:37 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp line 505:
>>
>>> 503: caller_saved.Insert(OptoReg::as_OptoReg(r10->as_VMReg()));
>>> 504: caller_saved.Insert(OptoReg::as_OptoReg(r11->as_VMReg()));
>>> 505: if (UseAVX > 2) {
>>
>> Similar question here: `ZSaveLiveRegisters` handles GP registers and vector registers differently. Why predicate registers are handled the same way GP registers are and not as vector registers?
>
> Hi Vladimir,
> ZGC load barriers embeds a CALL instruction which is not exposed to compiler, thus opmask registers which are caller saved as per X86 ABI are saved before making the call and later restored back.
I took a closer look at the relevant code and now I better understand what confuses me here.
Through vector registers are caller saved, they aren't added into caller_saved, but just unconditionally spilled.
Why can't you do the same for KRegisters? `caller_saved.Member(opto_reg)` should always be true for KRegister, shouldn't it?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2768
More information about the hotspot-compiler-dev
mailing list