RFR: 8319813: Remove upper limit on number of compiler phases in phasetype.hpp [v2]

Daniel Lundén duke at openjdk.org
Mon Nov 20 14:37:44 UTC 2023


On Mon, 20 Nov 2023 13:17:30 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:
>> 
>>   Update after comments
>
> src/hotspot/share/compiler/directivesParser.cpp line 343:
> 
>> 341:           valid = validator.is_valid();
>> 342:           if (valid) {
>> 343:             set->set_ideal_phase_mask(validator);
> 
> Why not pass it the mask directly?

Do you mean extracting the mask from the validator and then passing it to `set_ideal_phase_mask`? Isn't it simpler to just pass the validator and then handle it internally in `set_ideal_phase_mask`?

I've also renamed the above after Roberto's suggestion, so it's now:

set->set_ideal_phase_name_set(validator);

> src/hotspot/share/opto/phasetype.hpp line 200:
> 
>> 198:   const BitMap& mask() const { return _mask; }
>> 199:   bool is_valid() const { return _valid; }
>> 200:   bool is_mask_set() const { return _set; }
> 
> Why not use `_mask.is_empty()`? Then you can drop the `_set` field.

True, fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16729#discussion_r1399290297
PR Review Comment: https://git.openjdk.org/jdk/pull/16729#discussion_r1399284291


More information about the hotspot-compiler-dev mailing list