RFR: 8353041: NeverBranchNode causes incorrect block frequency calculation [v2]

Tobias Hartmann thartmann at openjdk.org
Wed Apr 9 06:25:34 UTC 2025


On Tue, 8 Apr 2025 22:51:35 GMT, Dean Long <dlong at openjdk.org> wrote:

>> This fixes a quality of implementation issue for infinite loops using a NeverBranch node.  We need Block::succ_prob() to return 1.0f for the 100% successful back-edge so that block frequencies are computed correctly.  I also fixed Block_Stack::most_frequent_successor() to choose the correct successor.  I verified that this corrects the huge frequency ratio that was detected and clamped by JDK-8346888.
>> 
>> Currently this bug is labeled noreg-hard with no new regression test, as it's not obvious how to write such as test.
>
> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/hotspot/share/opto/domgraph.cpp
>   
>   Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>

> Are reviewers OK with pushing this as-is w/o a regression test?

Fine with me.

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24390#pullrequestreview-2752181119


More information about the hotspot-compiler-dev mailing list