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(); }
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() {}
/// 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(); }