Integrated: 8288421: IGV: warn user about all unreachable nodes

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri Jun 17 07:34:57 UTC 2022


On Wed, 15 Jun 2022 08:50:39 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset ensures that, when approximating C2's schedule, IGV does not schedule unreachable nodes. Instead, a node warning is emitted, informing the user that the corresponding node is unreachable. This information can be useful when debugging ill-formed graphs.
> 
> The following clustered subgraph illustrates the proposed change:
> 
> ![before-after](https://urldefense.com/v3/__https://user-images.githubusercontent.com/8792647/173784252-5fccb80b-7c36-49bf-8c52-eed502cc129c.png__;!!ACWV5N9M2RV99hQ!NcAt_Ei55GPnByRh904XzmCjUL0pkmrp-Q5caWUXab7zb0v88LCtYXqdBLI9Xe3sjX-do_tNkNFTeNHMwfSPmsHmFrvD29YuB7pLfQ$ )
> 
> Currently _(before)_, `522 IfFalse` gets assigned the same block as `256 Region` (`B11`) in an effort to schedule as many nodes as possible, and hence no warning is emitted for `522 IfFalse`, even though it is clearly control-unreachable (since it is a child of `520 If` which is control-unreachable). This changeset _(after)_ leaves instead `522 IfFalse` unscheduled and emits a "Control-unreachable CFG node" warning for it (visible as a tooltip of the node warning sign).
> 
> As a side-benefit, the changeset simplifies the IGV scheduling algorithm by removing the code that tries to schedule unrechable nodes code on a best-effort basis, and adds two additional node warnings ("Region with multiple successors" and "CFG node without control successors") to highlight the new nodes that might remain unscheduled as a consequence. 
> 
> #### Testing
> 
> - Tested manually on the [graph](https://bugs.openjdk.org/secure/attachment/99555/graph.xml) attached to the JBS issue.
> 
> - 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 trigger any exception or assertion failure.

This pull request has now been integrated.

Changeset: f3da7ff6
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f3da7ff66e83a44118c090b7729dce858f0df1b1
Stats:     91 lines in 1 file changed: 11 ins; 79 del; 1 mod

8288421: IGV: warn user about all unreachable nodes

Reviewed-by: chagedorn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list