RFR: 8298935: fix cyclic dependency bug in create_pack logic in SuperWord::find_adjacent_refs [v22]

Emanuel Peter epeter at openjdk.org
Thu Mar 9 07:52:18 UTC 2023


On Wed, 8 Mar 2023 20:39:43 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> May be because I don't know what data `DepPreds` is operating on.

https://github.com/openjdk/jdk/blob/a44082b61f22dcdee115697f34d39c1d8382a15d/src/hotspot/share/opto/superword.cpp#L4913-L4934

This comes from
https://github.com/openjdk/jdk/blob/a44082b61f22dcdee115697f34d39c1d8382a15d/src/hotspot/share/opto/superword.cpp#L1094-L1097

Basically, `DepPreds` is an iterator of the `memory` (load / store) dependencies and the `data` dependencies.

The `memory` edges are detected during `dependence_graph`: For every slice, look at all pairs of memops (exclude Load-Load pairs, those are never true dependnecies). If we have `!SWPointer::not_equal` for the two memops, we do not know that they are "not-equal", and we add a dependence edge. If we know that `SWPointer::not_equal` we do not need a dependence edge, because the memory does not overlap (eg. `data[i]` and `data[i+1]`).

In the constructor of `DepPreds`, you can see what dependencies are included for each type of node:

- Load / Store

TODO continue

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

PR: https://git.openjdk.org/jdk/pull/12350


More information about the hotspot-compiler-dev mailing list