RFR: 8309463: IGV: Dynamic graph layout algorithm [v5]
Christian Hagedorn
chagedorn at openjdk.org
Tue Aug 22 13:14:46 UTC 2023
On Fri, 18 Aug 2023 15:44:50 GMT, emmyyin <duke at openjdk.org> wrote:
>> src/utils/IdealGraphVisualizer/HierarchicalLayout/src/main/java/com/sun/hotspot/igv/hierarchicallayout/HierarchicalStableLayoutManager.java line 1255:
>>
>>> 1253: found = false;
>>> 1254:
>>> 1255: if (n.vertex == null && n.succs.size() <= 1 && n.preds.size() <= 1) {
>>
>> I think `n.vertex == null` is always true and can be omitted
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14349#discussion_r1301527867
More information about the hotspot-compiler-dev
mailing list