RFR: JDK-8309410: [aarch64] Use pre-computed tables for logical immediates
Andrew Haley
aph at openjdk.org
Mon Jun 5 08:45:05 UTC 2023
On Sun, 4 Jun 2023 11:32:55 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> 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
We don't need a lookup table, because the boolean function is invertible. LLVM does it, for example.
I never bothered to do it because it doesn't seem worth the effort.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14304#issuecomment-1576377927
More information about the hotspot-compiler-dev
mailing list