[PATCH] D50479: Expose CFG Update struct. Define GraphTraits to get children given a snapshot CFG.
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 10 12:05:23 PDT 2018
kuhar added inline comments.
================
Comment at: include/llvm/IR/CFGDiff.h:60
+ GraphDiff() {}
+ GraphDiff(ArrayRef<cfg::Update<NodePtr>> Updates, bool InverseGraph = false) {
+ SmallVector<cfg::Update<NodePtr>, 4> LegalizedUpdates;
----------------
It's not clear to me what InverseGraph means here.
================
Comment at: include/llvm/IR/CFGDiff.h:82
+ auto &EdgesForBB = It->second;
+ if (llvm::find(EdgesForBB, EdgeEnd) != EdgesForBB.end())
+ return true;
----------------
`return llvm::find(EdgesForBB, EdgeEnd) != EdgesForBB.end();`
================
Comment at: include/llvm/IR/CFGDiff.h:101
+ "===== (Note: notion of children/inverse_children depends on "
+ "the direction of edges and the graph.\n";
+ OS << "Children to insert:\n\t";
----------------
missing `)`? :P
================
Comment at: include/llvm/IR/CFGDiff.h:113
+
+ void dump() const { print(dbgs()); }
+};
----------------
please guard this with the macro for dump methods
================
Comment at: include/llvm/Support/CFGUpdate.h:47
+
+ void dump() const { print(dbgs()); }
+};
----------------
Same as above - please guard this with the macro.
Repository:
rL LLVM
https://reviews.llvm.org/D50479
More information about the llvm-commits
mailing list