[master] RFR: Load Klass* from header, C2 implementation [v5]
Roman Kennke
rkennke at openjdk.java.net
Fri Feb 11 15:31:09 UTC 2022
> This implements loading the compressed Klass* from the object header in C2.
> This is quite a hack: normally we should change the load offset everywhere in C2 from 8 (current klass_offset_in_bytes) to 0 (the mark word offset). However, offset = 0 has different meaning in C2, it means no offset, and throws off all sorts of stuff in C2. Realistically, in the long run, we want to change to loading from offset 4 (upper half of the header), but we currently need to deal with locking, and thus load from offset 0.
>
> I fake it: I pretend to load from offset 4 everywhere in C2 ideal graph, but then load from offset 0 and check the mark bits instead. We can't leave the offset in ideal graph at 8 because that is going to conflict with loads from first field as soon as we drop the Klass*.
>
> We also need to ensure that C2 knows that the condition flags are clobbered (cr), and that src and dst are not the same register.
>
> Testing:
> - [x] tier1 (x86_64, aarch64)
> - [x] tier2 (x86_64, aarch64)
> - [x] tier3 (x86_64, aarch64)
Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
Revert "Experiment to keep using 8 as offset for LoadNKlass"
This reverts commit d247c3e285efb012595b879ec64f3314e26d6318.
-------------
Changes:
- all: https://git.openjdk.java.net/lilliput/pull/29/files
- new: https://git.openjdk.java.net/lilliput/pull/29/files/12d09bed..58f8071c
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=lilliput&pr=29&range=04
- incr: https://webrevs.openjdk.java.net/?repo=lilliput&pr=29&range=03-04
Stats: 29 lines in 15 files changed: 3 ins; 1 del; 25 mod
Patch: https://git.openjdk.java.net/lilliput/pull/29.diff
Fetch: git fetch https://git.openjdk.java.net/lilliput pull/29/head:pull/29
PR: https://git.openjdk.java.net/lilliput/pull/29
More information about the lilliput-dev
mailing list