RFR: 8285558: IGV: scheduling crashes on control-unreachable CFG nodes
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Fri May 27 10:19:08 UTC 2022
This changeset relaxes IGV's schedule approximation algorithm to handle CFG nodes that are not reachable from the root node via a control path. This is done by 1) removing the assumption that, after `ServerCompilerScheduler::buildBlocks()`, `Node::block` is non-null for CFG nodes; and 2) leaving the assignment of blockless nodes to an artificial "no block" to `InputGraph::ensureNodesInBlocks()`, which is always called after running the schedule approximation algorithm.
Additionally, the changeset marks unreachable CFG nodes with a warning, making it easier to identify ill-formed graphs:

#### Testing
- Tested manually on the two graphs reported in the [JBS issue](https://bugs.openjdk.java.net/browse/JDK-8285558).
- Tested automatically that scheduling tens of thousands of graphs (by instrumenting IGV to schedule parsed graphs eagerly and running `java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4`) does not introduce any exception or assertion failure.
-------------
Commit messages:
- Warn about control-unreachable CFG nodes
- Handle control-unreachable nodes
Changes: https://git.openjdk.java.net/jdk/pull/8916/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8916&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8285558
Stats: 24 lines in 1 file changed: 10 ins; 14 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/8916.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8916/head:pull/8916
PR: https://git.openjdk.java.net/jdk/pull/8916
More information about the hotspot-compiler-dev
mailing list