RFR: 8369211: AArch64: Devirtualize class RelocActions
Ashutosh Mehra
asmehra at openjdk.org
Thu Oct 16 03:13:03 UTC 2025
On Mon, 6 Oct 2025 15:14:59 GMT, Andrew Haley <aph at openjdk.org> wrote:
> RelocActions is instantiated every time we need to apply a reloc. There's really no need for this, and the use of virtual member functions and function pointers obfuscates the code.
>
> While C++ compilers can devirtualize much of this, they don't always devirtualize all of it. Let's make RelocActions all static.
Marked as reviewed by asmehra (Committer).
This looks good to me.
I just want to note that with this patch the two parameter version of `MacroAssembler::target_addr_for_insn` is not needed anymore. So there is scope for a bit more cleanup of the dead code.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27649#pullrequestreview-3342912347
PR Comment: https://git.openjdk.org/jdk/pull/27649#issuecomment-3408998188
More information about the hotspot-dev
mailing list