RFR: 8371536: C2: VerifyIterativeGVN should assert on first detected failure [v9]

Emanuel Peter epeter at openjdk.org
Wed Jan 28 10:19:48 UTC 2026


On Wed, 28 Jan 2026 10:08:25 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Defining a small, say `GVNVerificationPhase`, enum would already be cleaner, safer and less overhead.
>
> You could even make that a debug only field of `PhaseIterGVN` and override it for `PhaseCCP`.

Enum is a good idea, probably the best.

My suggestion was taking the `else if` condition `strcmp(phase, "PhaseCCP") == 0`, and convert it into an `assert(strcmp(phase, "PhaseCCP") == 0, "else case")`.

  } else {
    assert(strcmp(phase, "PhaseCCP") == 0, "else case");
    assert(false, "PhaseCCP not at fixpoint: analysis result may be unsound for %s", n->Name());
  }

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28295#discussion_r2735920762


More information about the hotspot-compiler-dev mailing list