RFR: 8325651: C2 SuperWord: refactor the dependency graph [v2]
Christian Hagedorn
chagedorn at openjdk.org
Thu Mar 7 16:17:59 UTC 2024
On Thu, 7 Mar 2024 15:31:23 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> rename extra -> memory
>
> src/hotspot/share/opto/vectorization.cpp line 225:
>
>> 223: DependencyNode* dn = new (_arena) DependencyNode(n, memory_pred_edges, _arena);
>> 224: _dependency_nodes.at_put_grow(_body.bb_idx(n), dn, nullptr);
>> 225: }
>
> The call to `add_node()` suggests that we add a node no matter what. I therefore suggest to either change `add_node` to something like `maybe_add_node` or do the check like that:
>
> if (memory_pred_edges.is_nonempty()) {
> add_node(n1, memory_pred_edges);
> }
For completeness, should we also add a comment here or/and at `DependencyNode` that such a node is only created when there is no direct connection in the C2 memory graph since we would visit direct connections in `PredsIterator` anyways?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17812#discussion_r1516443249
More information about the hotspot-compiler-dev
mailing list