[PATCH] D84562: [GraphDiff] Use class method getChildren instead of GraphTraits.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 18:43:51 PDT 2020


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good



================
Comment at: llvm/lib/Analysis/MemorySSAUpdater.cpp:835
       BasicBlock *Pred = nullptr;
-      for (auto &Pair : children<GraphDiffInvBBPair>({GD, BB})) {
-        Pred = Pair.second;
+      for (auto *Pi : GD->template getChildren</*InverseEdge=*/true>(BB)) {
+        Pred = Pi;
----------------
If the inverse edge part is going to be part of the "public" API, might be worth defining an enum for it, so you don't have to add a comment to every parameter like this. Fine to do that in a separate/follow-up commit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84562/new/

https://reviews.llvm.org/D84562





More information about the llvm-commits mailing list