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

Daniel Lundén dlunden at openjdk.org
Tue Sep 16 11:55:36 UTC 2025


On Tue, 16 Sep 2025 09:58:11 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/regmask.hpp line 464:
>> 
>>> 462:     copy(rm);
>>> 463:     return *this;
>>> 464:   }
>> 
>> You could also delete this one, and use the `copy` explicitly at the use site. That would make the allocations a bit more explicit. What do you think?
>> Whenever possible, it is nice to be able to declare a type `NONCOPYABLE`. Especially if it does allocations where copy is non-trivial.
>
> You already removed some assignments, like this one, which is good:
> https://github.com/openjdk/jdk/pull/20404/files#diff-344e52fd6be79f1d97a33d7ebbf131148df90bb52e3b33952340e8d37a3849d8L1501-R1512
> 
> Generally, there are a lot of constructors here. All of them are public, none explicit. Maybe that is just how it has to be, but maybe you can simplify a little.

I agree with you in principle, but the copy constructor and assignment operator are heavily used by the ADLC-generated code. I prefer not touching it, at least in this PR.

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

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


More information about the hotspot-compiler-dev mailing list