RFR: 8325467: Support methods with many arguments in C2 [v12]
Daniel Lundén
dlunden at openjdk.org
Thu Apr 3 12:59:14 UTC 2025
On Tue, 1 Apr 2025 16:16:36 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Daniel Lundén has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Formatting updates
>> - Add register mask fuzzer test
>
> src/hotspot/share/opto/chaitin.cpp line 1655:
>
>> 1653: // Bump register mask up to next stack chunk
>> 1654: bool success = lrg->rollover();
>> 1655: if (!success) {
>
> Was this scenario (running out of stack slots representable in `OptoRegPairs`) possible before, or was it prevented by some check removed in the changeset? Did you come across it in some compilation or is it more of a "theoretical" guard?
Yes, it is a theoretical guard (also see the discussions earlier in this PR) and could also happen before this changeset if we roll over too much in `Select`. I experimented a bit with this earlier on and was not able to construct an example where we end up in this situation.
> src/hotspot/share/opto/regmask.hpp line 282:
>
>> 280: _grow(src._rm_size, false);
>> 281: memcpy(_RM_UP_EXT, src._RM_UP_EXT,
>> 282: sizeof(uintptr_t) * (src._rm_size - _RM_SIZE));
>
> This code is not very well covered by current tests, please consider adding some tests to `test_regmask.cpp` to exercise it.
Now added!
> src/hotspot/share/opto/regmask.hpp line 293:
>
>> 291: _hwm = _rm_max();
>> 292: }
>> 293: _set_range(src._rm_size, value, _rm_size - src._rm_size);
>
> This code is not very well covered by current tests, please consider adding some tests to `test_regmask.cpp` to exercise it.
Now added!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2026941355
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2026941803
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2026941926
More information about the hotspot-compiler-dev
mailing list