RFR: 8355488: Add stress mode for C2 loop peeling [v3]
Marc Chevalier
mchevalier at openjdk.org
Fri May 16 07:58:37 UTC 2025
On Thu, 15 May 2025 12:19:05 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Back to PRODUCT for consistency
>
> src/hotspot/share/opto/loopTransform.cpp line 522:
>
>> 520: loop_head->_peeling_opportunities_count++;
>> 521: // In case of stress, let's just pick randomly...
>> 522: return phase->C->random() % 2 == 0 ? estimate : 0;
>
> Suggestion:
>
> return ((phase->C->random() % 2) == 0) ? estimate : 0;
Done. But does that really helps you? To me it's just more confusing. It looks like "I put parentheses because it will associate in a surprising way", and then the most normal things comes. I often wonder whether the parentheses are misplaced, or whether there is something subtle I don't get.
But anyway, parentheses are in!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25140#discussion_r2092532652
More information about the hotspot-compiler-dev
mailing list