RFR: 8325467: Support methods with many arguments in C2 [v27]

Daniel Lundén dlunden at openjdk.org
Tue Sep 16 12:17:27 UTC 2025


On Tue, 16 Sep 2025 10:31:33 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Daniel Lundén has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 39 commits:
>> 
>>  - Clarify comments in regmask.hpp
>>  - Merge remote-tracking branch 'upstream/master' into many-arguments-8325467+pr-updates
>>  - Address review comments (renaming on the way in a separate PR)
>>  - Update src/hotspot/share/opto/regmask.hpp
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>>  - Restore modified java/lang/invoke tests
>>  - Sort includes (new requirement)
>>  - Merge remote-tracking branch 'upstream/master' into many-arguments-8325467+pr-updates
>>  - Add clarifying comments at definitions of register mask sizes
>>  - Fix implicit zero and nullptr checks
>>  - Add deep copy comment
>>  - ... and 29 more: https://git.openjdk.org/jdk/compare/60930a3e...c1f41288
>
> src/hotspot/share/opto/postaloc.cpp line 681:
> 
>> 679:             for (int l = 1; l < n_regs; l++) {
>> 680:               OptoReg::Name ureg_lo = OptoReg::add(ureg,-l);
>> 681:               bool is_reg = OptoReg::is_reg(ureg_lo);
> 
> Only needed in assert. Do you really need to give it a separate name? Subjective, your choice.
> 
> Does it have a side-effect?

Giving it a name is only for clarity, mirroring the style of `is_adjacent` in the `assert`. I'll inline it, no problem. No side-effect.

> src/hotspot/share/opto/regmask.hpp line 122:
> 
>> 120:     // the machine registers and usually all parameters that need to be passed
>> 121:     // on the stack (stack registers) up to some interesting limit. On Intel,
>> 122:     // the limit is something like 90+ parameters.
> 
> You may say that that in the "unusual" case, we have to use `_rm_word_ext`. Just so the reader knows what the ominous "usually" refers to ;)

Yes, thanks. I'll update this comment to reflect the new register mask features.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2352277426
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2352285497


More information about the hotspot-compiler-dev mailing list