[PATCH] D78861: [Attributor] [WIP] Track AA dependency using dependency graph
Kuter Dinel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 04:14:00 PDT 2020
kuter added a comment.
@bbn Soo, I just realized that this way of implementing `GraphTraits` might be problematic with
graph iterators like (`scc_iterator`, `df_ iterator`) since they require a single entry point to correctly handle
disconnected graphs and the `Attributor` dependencies are disconnected. Most disconnected graphs use a "synthetic node"
because of this.
I did not tested this but if we where to `df_iterator::begin(AA.DG)` you would iterate over nodes that you can reach
by following the dependency edges of the first `AbstractAttribute` that is inside .
`GraphWriter` works well since it iterates over the nodes with `::nodes_start()` and `::nodes_end()`.
If you do not require looking across connected components in your own work we can merge this patch like this and
I can write a separate patch that fixes this issue when I need to use the `scc_iterator`.
Only solution I can find for this that don't increase memory consumption, is to move the dependency tracking out of the
`AbstractAttribute` into a class like `AADepNode` and make `AbstractAttribute` inherit dependency tracking from that class.
If we where to move `AllAbstractAttributes` into the "synthetic node" we would have near zero memory overhead.
I know that this kinda like your initial implementation. sorry for the inconvenience.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78861/new/
https://reviews.llvm.org/D78861
More information about the llvm-commits
mailing list