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

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Tue Aug 20 16:43:31 UTC 2024


On Tue, 20 Aug 2024 14:25:22 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> src/hotspot/share/opto/regmask.hpp line 362:
>> 
>>> 360:   // Verify watermarks are sane, i.e., within bounds and that no
>>> 361:   // register words below or above the watermarks have bits set.
>>> 362:   bool valid_watermarks() const {
>> 
>> For sanity, should we also assert here, and enforce across the code, that `_lwm <= _hwm`, even in the case of `Size() == 0` or is this invariant too expensive/difficult to maintain?
>
> We could do that, but I'm not sure I see the benefit. Could you elaborate a bit?

The benefit, in my opinion, is better comprehensibility due to a simpler model with stronger invariants. An alternative would be to extend the comment at the definition of `_lwm` and `_hwm` clarifying that the value of these variables is unspecified when the register set is empty.

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

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


More information about the hotspot-compiler-dev mailing list