RFR: 8302167: Avoid allocating register in fast_lock()
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Feb 10 17:39:57 UTC 2023
On Thu, 9 Feb 2023 18:09:08 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> In x86's C2MacroAssembler::fast_lock(), we are never really using the cx1Reg register, except in the DiagnoseSyncOnValueBasedClasses path, where we can just as well use the scrReg register.
>
> What's worse, in x86_32.ad, we don't allocate the cx1 register and pass noreg, so the DiagnoseSyncOnValueBasedClasses would be broken on x86_32.
>
> We can simply avoid allocating that extra register (which may help performance under register pressure), and use scr in DiagnoseSyncOnValueBasedClasses.
>
> Testing:
> - [x] tier1
> - [ ] tier2
Marked as reviewed by kdnilsen (no project role).
-------------
PR: https://git.openjdk.org/jdk/pull/12499
More information about the hotspot-compiler-dev
mailing list