Integrated: 8353041: NeverBranchNode causes incorrect block frequency calculation
Dean Long
dlong at openjdk.org
Wed Apr 9 20:09:35 UTC 2025
On Wed, 2 Apr 2025 19:51:37 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.
This pull request has now been integrated.
Changeset: 776e1cf1
Author: Dean Long <dlong at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/776e1cf1dfefd7cb1a0190ab71f71ad5ff25d0e4
Stats: 20 lines in 2 files changed: 18 ins; 1 del; 1 mod
8353041: NeverBranchNode causes incorrect block frequency calculation
Reviewed-by: thartmann, rcastanedalo
-------------
PR: https://git.openjdk.org/jdk/pull/24390
More information about the hotspot-compiler-dev
mailing list