RFR: 8308076: X86_64: make rheapbase register allocatable in zero based compressedOops mode

kuaiwei duke at openjdk.org
Mon May 15 12:05:46 UTC 2023


On Mon, 15 May 2023 07:31:08 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Please see [JDK-8221249](https://bugs.openjdk.org/browse/JDK-8221249). A possible further improvement you can try is to allocate a vector register to be a dedicated zero register, this also helps other operations such as clear memory of newly created objects.
> 
> Thanks.

Thanks for your suggestion. Before my work, I searched previous discussion but not find this one.

It looks no performance benefit in previous tests. But I find some performance gain in renaissance benchmark. And I also noticed some regression, in general, it looks a better score. I'm still running it multiple times to get a stable result. , I think the regression may has 2 causes
1 JVM can not use r12 as immediate 0
2 new heap decode instruction must has 32bit offset, it will enlarge the code size and increase icache pressure.

It's the tradeoff. It may dependents on app behavior. So I added a new option PreserveHeapbaseReg to switch.

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

PR Comment: https://git.openjdk.org/jdk/pull/13976#issuecomment-1547727039


More information about the hotspot-dev mailing list