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

Daniel Lundén dlunden at openjdk.org
Mon Sep 8 15:49:27 UTC 2025


On Tue, 2 Sep 2025 14:08:11 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> The main issue is that register masks are stored as part of certain nodes, and nodes get copied by `Node::clone`. If someone in the future decide to add a register mask to some type of node, and forget to add a special case (like what I've now added for `MachProj`) in `Node::clone` for the node type, this safeguard will catch it and complain.
>> 
>> Register masks are used in peculiar ways throughout C2, and there may be other unexpected cases as well that this safeguard catches. I doubt the `_read_only` part has a measurable performance effect, I only added it because it was easy and couldn't hurt.
>
>> The main issue is that register masks are stored as part of certain nodes, and nodes get copied by Node::clone
> 
> Ok, that answers it for me. Maybe you can expand the comment a little where you mention that masks are `shallowly copied`

Sure, will do.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20404#discussion_r2330650060


More information about the hotspot-compiler-dev mailing list