RFR: 8325467: Support methods with many arguments in C2 [v27]
Daniel Lundén
dlunden at openjdk.org
Wed Sep 17 09:52:03 UTC 2025
On Tue, 16 Sep 2025 12:02:13 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/chaitin.cpp line 1663:
>
>> 1661: if (!OptoReg::is_valid(reg) && is_infinite_stack) {
>> 1662: // Bump register mask up to next stack chunk
>> 1663: bool success = lrg->rollover();
>
> Can you add a comment that explains what this does / means? Do we start spilling to the stack slots instead of using registers?
Sure, I'll expand on the existing comment.
> src/hotspot/share/opto/regmask.hpp line 837:
>
>> 835: // ----------------------------------------------------------------------
>> 836: // The methods below are only for testing purposes (see test_regmask.cpp)
>> 837: // ----------------------------------------------------------------------
>
> I wonder if it could be solved with `friend` instead, so it does not have to be public and get accidentally used somehow.
>
> Or maybe some `gtest_` prefix? Not sure.
I like adding a `gtest_` prefix, I'll do that. Not sure how to make gtests work with `friend`.
> test/hotspot/jtreg/compiler/arguments/TestMethodArguments.java line 51:
>
>> 49: static final int INPUT_SIZE = 100;
>> 50:
>> 51: public static Template.ZeroArgs generateTest(PrimitiveType t, int numberOfArguments) {
>
> You should write out `type` instead of `t`, would make it consistent with your `let` below.
Thanks, I'll fix it
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2354938220
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2354945861
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2354946296
More information about the hotspot-compiler-dev
mailing list