RFR: 8309463: IGV: Dynamic graph layout algorithm [v5]
emmyyin
duke at openjdk.org
Fri Aug 25 08:46:17 UTC 2023
On Thu, 24 Aug 2023 10:52:26 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> 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. The `found` variable is to ensure the dummy node is actually connected to something. Not sure if that part is actually needed
>
> Thanks for explaining it in more details. We probably had a misunderstanding here, though. Toby and I were referring to this `n.vertex == null` here:
>
> if (n.vertex == null && n.succs.size() <= 1 && n.preds.size() <= 1)
>
> and not the one in
>
> while (n.vertex == null && found)
>
> From your explanation it makes sense to keep the one in the `while` but the other one in the `if` always seems to be true and could thus be removed.
Oh okay thanks for clarifying that makes sense!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14349#discussion_r1305376237
More information about the hotspot-compiler-dev
mailing list