RFR: 8325467: Support methods with many arguments in C2 [v2]
Daniel Lundén
dlunden at openjdk.org
Tue Aug 13 10:19:49 UTC 2024
On Mon, 12 Aug 2024 13:16:11 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove leftover CHUNK_SIZE reference
>
> src/hotspot/share/opto/postaloc.cpp line 765:
>
>> 763: // in both registers.
>> 764: OptoReg::Name nreg_lo = OptoReg::add(nreg,-1);
>> 765: if( !lrgs(lidx).mask().Member(nreg_lo) ) { // Nearly always adjacent
>
> Is the removal of `// Either a spill slot, or` intentional?
Unintentional, and I have to look closer at this. I suspect the "Either a spill slot" comment refers to if the register is larger than or equal to `LRG::SPILL_REG`, which I believe is implied by `!RegMask::can_represent(nreg_lo)` at this stage of `PhaseChaitin`. We should probably replace `RegMask::can_represent(nreg_lo)` with an explicit check `nreg_lo < LRG::SPILL_REG`.
> src/hotspot/share/opto/regmask.hpp line 82:
>
>> 80: // In rare situations (e.g., "more than 90+ parameters on Intel"), we need to
>> 81: // extend the register mask with dynamically allocated memory.
>> 82: uintptr_t* _RM_UP_EXT = nullptr;
>
> Have you considered using a growable array (`src/hotspot/share/utilities/growableArray.hpp`) for this part?
No, I'll have a look and see if it makes sense to use growable arrays in this case. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r1715045904
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r1715046316
More information about the hotspot-compiler-dev
mailing list