Integrated: 8259984: IGV: Crash when drawing control flow before GCM
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Fri Feb 19 08:21:41 UTC 2021
On Wed, 17 Feb 2021 12:23:55 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> The block formation algorithm applied by IGV to schedule graphs without associated CFG information traverses the graph backwards. This makes it difficult to deal with block projection nodes, leading in some cases to double addition of block nodes and block edges, and ultimately causing assertion failures.
>
> This fix replaces the backward traversal by a forward traversal that relies on node category information (introduced in [8261336](https://bugs.openjdk.java.net/browse/JDK-8261336)) to identify control successors. The forward traversal is arguably simpler and, besides avoiding the reported assertion failure, has two advantages:
>
> - it places block projection nodes in the same block as their predecessors, and
> - it numbers basic blocks more naturally.
>
> The following screenshots illustrate the improvements (before the fix to the left, after the fix to the right):
>
> 
>
> Tested automatically on tens of thousands of graphs by running `java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4 ...` on an instrumented version of IGV that schedules graphs eagerly. Checked manually that the CFGs of a few selected graphs (included the reported one) are well-formed. Also checked that the overall IGV graph scheduling time is not affected by the changes.
>
> Thanks to Christian Hagedorn for checking the fix independently.
This pull request has now been integrated.
Changeset: 61820b74
Author: Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/61820b74
Stats: 169 lines in 1 file changed: 92 ins; 15 del; 62 mod
8259984: IGV: Crash when drawing control flow before GCM
Replace backward traversal in the IGV block formation algorithm by forward
traversal guided by node category information. This change addresses the
reported assertion failures, places block projection nodes together with their
predecessors, and gives a more natural block numbering.
Reviewed-by: chagedorn, neliasso
-------------
PR: https://git.openjdk.java.net/jdk/pull/2607
More information about the hotspot-compiler-dev
mailing list