RFR: JDK-8309410: [aarch64] Use pre-computed tables for logical immediates
Thomas Stuefe
stuefe at openjdk.org
Sun Jun 4 15:45:39 UTC 2023
We compute the lookup tables for logical immediates on startup. We should use pre-computed tables instead.
If we do that, we don't even need the encoding->immediate lookup table, since that is only used during generation of the reverse lookup table. Since we hardcode the latter, we don't need to store the former.
I kept the old generator code around to test the hard-coded table (see gtest). To keep reviewing simple, the generator code itself lives still in the same place, mostly unchanged.
Note that we could shave off some more space for the reverse lookup table by storing immediate and encoding in separate arrays, since we now pay 16 bytes per entry due to alignment. We could also reduce the encoding from 32 bits to 16 bits. I did not do this to not overload this RFE.
Tests: manually ran tests on linux aarch64, OsX aarch64
-------------
Commit messages:
- fix build errors
- no need for LITable
- hardcode-aarch64-logical-imms
Changes: https://git.openjdk.org/jdk/pull/14304/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14304&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8309410
Stats: 1504 lines in 5 files changed: 1463 ins; 33 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/14304.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14304/head:pull/14304
PR: https://git.openjdk.org/jdk/pull/14304
More information about the hotspot-compiler-dev
mailing list