RFR: 8341611: [REDO] AArch64: Clean up IndOffXX type and let legitimize_address() fix out-of-range operands

Fei Gao fgao at openjdk.org
Tue Jan 7 15:53:35 UTC 2025


On Mon, 23 Dec 2024 19:01:52 GMT, Andrew Haley <aph at openjdk.org> wrote:

> In general I like this very much. If I were you I'd count how often `legitimize_address` has to split an instruction, and also count the total size of all C2 compilations over a run. I'd perhaps run jshell or javac all of java.base. Then we'd know how rare `legitimize_address` splitting is. Thanks.

Thanks for your review and comments! @theRealAph

Yes, as expected, `legitimize_address` splitting is very rare. As you suggested, I compiled all of `java.base` with built `javac` and found over `700k` `load/store` generated by C2 but no `legitimize_address` splitting. Actually, no `legitimize_address` splitting happened even I did `make bootcycle-images`. From our experience, `Unsafe` APIs can generate unaligned offsets and some corner cases may generate out-of-range offsets.

I'll update the comments for the code in the next commit soon. Thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/22862#issuecomment-2575632823


More information about the hotspot-dev mailing list