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

Daniel Lundén dlunden at openjdk.org
Tue Aug 13 10:25:50 UTC 2024


On Mon, 12 Aug 2024 20:22:14 GMT, Dean Long <dlong 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
>
> Don't we still need RegMask::can_represent() checks to make sure regmask size doesn't exceed what OptoReg and OptoRegPair  can represent?  Otherwise we will need checks every time we create a new OptoReg or OptoRegPair, or is there a better way?

@dean-long

> Does C2 have a maximum frame size?

I'll investigate, unless someone already has the answer.

> Don't we still need RegMask::can_represent() checks to make sure regmask size doesn't exceed what OptoReg and OptoRegPair can represent? Otherwise we will need checks every time we create a new OptoReg or OptoRegPair, or is there a better way?

Yes, we should add checks somewhere. My initial thought was to have them whenever growing or offsetting register masks (operations that change what a register mask can represent), and bail out upon failing a check. But, then we may have bailouts whenever, e.g., inserting into register masks, which is probably difficult to handle.

Also, even before my changes, `OptoReg`s may overflow in `PhaseChaitin::Select` because, even though register masks have a limit, there is no limit on how much `chunk` can grow. That is, one could also argue that `OptoReg` overflow is a separate issue.

I will have to think a bit more about this.

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

PR Comment: https://git.openjdk.org/jdk/pull/20404#issuecomment-2285904155


More information about the hotspot-compiler-dev mailing list