Integrated: 8340453: C2: Improve encoding of LoadNKlass for compact headers
Roman Kennke
rkennke at openjdk.org
Fri Nov 15 18:13:51 UTC 2024
On Wed, 13 Nov 2024 15:08:03 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> We currently use the offset 4 as a placeholder in LoadNKlass, when running with compact headers. In reality, we are loading from offset 0, but we want to keep LoadNKlass on a separate memory slice from other mark-word-accesses, because LoadNKlass is essentially immutable memory. The consequence is that we need to figure out the address of the mark-word in the backend, and this is ugly.
>
> However, we can do better. We can just as well load 4 bytes from offset 4, and shift by a 32 smaller shift. This has previously not been possible because we needed to check for the monitor bit in the markWord, but this is no longer necessary. This simplifies the code and even makes the instructions encoding a bit smaller.
>
> Testing:
> - [x] tier1 aarch64 +UCOH
> - [x] tier1 x86_64 +UCOH
This pull request has now been integrated.
Changeset: ff12ff53
Author: Roman Kennke <rkennke at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/ff12ff534abb2e08d1bb44a83ef4f84b8476f94c
Stats: 59 lines in 9 files changed: 17 ins; 33 del; 9 mod
8340453: C2: Improve encoding of LoadNKlass for compact headers
Reviewed-by: rcastanedalo, mli
-------------
PR: https://git.openjdk.org/jdk/pull/22078
More information about the hotspot-compiler-dev
mailing list