RFR: 8309463: IGV: Dynamic graph layout algorithm [v5]

emmyyin duke at openjdk.org
Thu Aug 24 09:02:35 UTC 2023


On Tue, 22 Aug 2023 11:52:46 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> This is to make the loop break once we hit the non-dummy node where the edge goes from. I.e. for the edge (u,v) with lots of dummy nodes in between nodes u and v, we only want to remove the dummy nodes and then break the loop as soon as we are at node u.
>
> I still don't understand why you need `n.vertex == null` here. If `n.vertex != null`, then the loop continuation test `n.vertex == null && found` will be false and we will not perform another iteration.

Exactly, if `n.vertex == null` we want to break the loop. There are two cases we need to consider when removing the dummy nodes: 1) there is a long chain of dummy nodes between node u and v, and 2) the edge is part of an edge concentration of multiple edges. In case 1) we just traverse the edge with all the dummy nodes and remove them as we go until we hit node u (`n.vertex != null`). In case 2) we traverse along the edge until we find the anchor node (which is a dummy node with one ingoing edge and multiple outgoing edges), and break the loop when we reach the anchor node.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14349#discussion_r1304025731


More information about the hotspot-compiler-dev mailing list