RFR: 8320649: C2: Optimize scoped values [v4]

Emanuel Peter epeter at openjdk.org
Wed Jan 17 14:44:00 UTC 2024


On Wed, 17 Jan 2024 14:05:32 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   merge fix
>
> src/hotspot/share/opto/callGenerator.cpp line 1127:
> 
>> 1125:       prob = PROB_UNKNOWN;
>> 1126:     } else {
>> 1127:       prob = (1 - get_cache_prob) + get_cache_prob * (get_first_prob + (1 - get_first_prob) * get_second_prob);
> 
> Suggestion:
> 
>       cache_miss_prob = (1 - get_cache_prob) + // cache array is null
>                       get_cache_prob * ( // cache array not null, and:
>                          get_first_prob + // first has cache miss
>                          (1 - get_first_prob) * get_second_prob // first hits, but second misses
>                        );

idk if this helps, maybe the alignment would have to be improved too.
But maybe just slightly better naming would also do the trick?

> src/hotspot/share/opto/compile.cpp line 465:
> 
>> 463:   remove_useless_late_inlines(         &_boxing_late_inlines, useful);
>> 464:   remove_useless_late_inlines(&_vector_reboxing_late_inlines, useful);
>> 465:   remove_useless_late_inlines(          &_scoped_value_late_inlines, useful);
> 
> Suggestion:
> 
>   remove_useless_late_inlines(   &_scoped_value_late_inlines, useful);

Make it align with the code above

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1455653387
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1455725257


More information about the hotspot-compiler-dev mailing list