RFR: 8325467: Support methods with many arguments in C2 [v2]
Daniel Lundén
dlunden at openjdk.org
Mon Sep 9 13:48:11 UTC 2024
On Tue, 13 Aug 2024 10:17:03 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:
>> 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`.
I cannot observe any case where `nreg_lo` here is larger than or equal to `LRG::SPILL_REG`, so it doesn't look like that is what the comment refers to. I've now added an `assert` that ensures my assumptions regarding removing the "Either a spill slot" line makes sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r1750299868
More information about the hotspot-compiler-dev
mailing list