RFR: 8301997: Move method resolution information out of the cpCache [v6]
Andrew Dinn
adinn at openjdk.org
Wed Nov 1 09:21:17 UTC 2023
On Tue, 31 Oct 2023 22:48:27 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 2374:
>>
>>> 2372:
>>> 2373: // setup registers
>>> 2374: const Register index = r4;
>>
>> Hardcoding is not very nice. Maybe reuse one of the other registers?
>
> This exists in x86 as well in each of the `load_resolved_method_entry_...()` methods. Some of these only have three arguments which cannot be reused so there is the option to include `index` as an argument, but this introduces an inconsistency among these similar methods.
>
> Should all of these methods take `index` which can be a reused register?
If you add an extra argument then please name it `temp` or something equally clear as to the fact that this is for storing a local scratch value rather than an input/output. n.b. this is the main reason for resisting the urge to move register declarations+initializations up the call chain. It makes it less obvious that a register is only being used local to a callee.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15455#discussion_r1378560173
More information about the hotspot-dev
mailing list