RFR: 8367397: Improve naming and terminology in regmask.hpp and regmask.cpp [v5]
Daniel Lundén
dlunden at openjdk.org
Fri Sep 12 13:08:06 UTC 2025
On Fri, 12 Sep 2025 12:36:55 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Daniel Lundén has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Rename constants
>
> src/hotspot/share/opto/chaitin.hpp line 51:
>
>> 49: class LRG : public ResourceObj {
>> 50: public:
>> 51: static const uint InfiniteStack_size = 0xFFFFF; // This mask size is used to tell that the mask of this LRG supports stack positions
>
> We may want to prevent this from snowballing everywhere ... but this is also a constant and we probably want to call it `INFINITE_STACK_SIZE`, right?
I agree, now fixed (but yes, we need to stop snowballing at some point!)
> src/hotspot/share/opto/regmask.cpp line 249:
>
>> 247: if (_rm_word[i]) { // Found some bits
>> 248: // Convert to bit number, return hi bit in pair
>> 249: return OptoReg::Name((i<<LogBitsPerWord) + find_lowest_bit(_rm_word[i]) + (size - 1));
>
> Suggestion:
>
> return OptoReg::Name((i << LogBitsPerWord) + find_lowest_bit(_rm_word[i]) + (size - 1));
>
> Might as well fix code style while we touch it ;)
Sure, now fixed (and checked and updated all other touched code as well)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27215#discussion_r2344192294
PR Review Comment: https://git.openjdk.org/jdk/pull/27215#discussion_r2344194711
More information about the hotspot-compiler-dev
mailing list