RFR: 8286451: C2: assert(nb == 1) failed: only when the head is not shared [v2]

Roland Westrelin roland at openjdk.java.net
Tue Jun 7 15:08:43 UTC 2022


> nb counts the number of loops that share a single head. The assert
> that fires is in code that handles the case of a self loop (a loop
> composed of a single block). There can be a self loop and multiple
> loops that share a head: the assert makes little sense and I propose
> to simply remove it.
> 
> I think there's another issue with this code: in the case of a self
> loop and multiple loops that share a head, the self loop can be any of
> the loop for which the head is cloned not only the one that's passed
> as argument to ciTypeFlow::clone_loop_head(). As a consequence, I
> moved the logic for self loops in the loop that's applied to all loops
> that share the loop head.

Roland Westrelin 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:

 - review
 - Merge branch 'master' into JDK-8286451
 - fix & test

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8947/files
  - new: https://git.openjdk.java.net/jdk/pull/8947/files/7ece2dc2..f3943fc7

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8947&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8947&range=00-01

  Stats: 53849 lines in 735 files changed: 28430 ins; 18849 del; 6570 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8947.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8947/head:pull/8947

PR: https://git.openjdk.java.net/jdk/pull/8947


More information about the hotspot-compiler-dev mailing list