RFR: 8350330: C2: PhaseIdealLoop::add_parse_predicate() should mirror GraphKit::add_parse_predicate()

Roland Westrelin roland at openjdk.org
Thu Jan 22 16:33:21 UTC 2026


`PhaseIdealLoop::add_parse_predicate()` was intented to mirror
`GraphKit::add_parse_predicate()` but it doesn't. That last one checks
`too_many_traps` per bci but the `PhaseIdealLoop` version doesn't. As
demonstrated by the test case, a method can get compiled with a
predicate, take a trap, and get recompiled with the same predicate
many times (up to ~100).

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

Commit messages:
 - test & fix

Changes: https://git.openjdk.org/jdk/pull/29367/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29367&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350330
  Stats: 123 lines in 3 files changed: 100 ins; 20 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/29367.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29367/head:pull/29367

PR: https://git.openjdk.org/jdk/pull/29367


More information about the hotspot-compiler-dev mailing list