[PATCH] D85065: [Attributor][NFC] Update description for the dependency graph
Luofan Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 1 06:27:44 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfa30adecc766: [Attributor][NFC] Update description for the dependency graph (authored by bbn).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85065/new/
https://reviews.llvm.org/D85065
Files:
llvm/include/llvm/Transforms/IPO/Attributor.h
Index: llvm/include/llvm/Transforms/IPO/Attributor.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/Attributor.h
+++ llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -155,8 +155,8 @@
using DepTy = PointerIntPair<AADepGraphNode *, 1>;
protected:
- /// Set of dependency graph nodes which this one depends on.
- /// The bit encodes if it is optional.
+ /// Set of dependency graph nodes which should be updated if this one
+ /// is updated. The bit encodes if it is optional.
TinyPtrVector<DepTy> Deps;
static AADepGraphNode *DepGetVal(DepTy &DT) { return DT.getPointer(); }
@@ -184,6 +184,11 @@
friend struct AADepGraph;
};
+/// The data structure for the dependency graph
+///
+/// Note that in this graph if there is an edge from A to B (A -> B),
+/// then it means that B depends on A, and when the state of A is
+/// updated, node B should also be updated
struct AADepGraph {
AADepGraph() {}
~AADepGraph() {}
@@ -197,7 +202,6 @@
/// requires a single entry point, so we maintain a fake("synthetic") root
/// node that depends on every node.
AADepGraphNode SyntheticRoot;
-
AADepGraphNode *GetEntryNode() { return &SyntheticRoot; }
iterator begin() { return SyntheticRoot.child_begin(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85065.282394.patch
Type: text/x-patch
Size: 1297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200801/b9a440cf/attachment.bin>
More information about the llvm-commits
mailing list