RFR: 8319451: PhaseIdealLoop::conditional_move is too conservative [v2]
Claes Redestad
redestad at openjdk.org
Thu Dec 14 15:22:43 UTC 2023
On Tue, 12 Dec 2023 16:39:17 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Hi,
>>
>> When transforming a Phi into a CMove, the threshold is set to be approximately BlockLayoutMinDiamondPercentage, the reason is given:
>>
>> // BlockLayoutByFrequency optimization moves infrequent branch
>> // from hot path. No point in CMOV'ing in such case
>>
>> This sets the default value of the threshold to be around 18%, which is too conservative. The reason also does not make a lot of sense since the important property which makes jumping expensive is not code layout. We should remove this.
>>
>> Please kindly review, thank you very much.
>
> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - change freq to double
> - Merge branch 'master' into cmovethreshold
> - adjust threshold, add benchmark
Thank you for the work on this and for picking up on my suggestions for the microbenchmark! Looking forward to see the effects of this on a wider selection of benchmarks.
-------------
Marked as reviewed by redestad (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16524#pullrequestreview-1782059077
More information about the hotspot-compiler-dev
mailing list