[PATCH] D29705: Fix PR 24415 (at least), by making our post-dominator tree behavior sane.

bryant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 06:06:04 PST 2017


bryant added a comment.

Minor things.



================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:165
+    for (auto I = FuncGraphT::nodes_begin(&F), E = FuncGraphT::nodes_end(&F);
+         I != E; ++I) {
+      ++Total;
----------------
Ranged-for? `for (NodeType *BB: make_range(FuncGraphT::nodes_begin(&F), FuncGraphT::nodes_end(&F))) {`.


================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:177
+      // Make another DFS pass over all other nodes to find the unreachable
+      // blocks, and find the furthest paths we'll be able to make.  block.
+      // Note that this looks N^2, but it's really 2N worst case, if every node
----------------
Typo? "make.  block."


================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:184
+      for (auto I = FuncGraphT::nodes_begin(&F), E = FuncGraphT::nodes_end(&F);
+           I != E; ++I)
+        if (!DT.Info.count(*I)) {
----------------
Ranged-for?


================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:247
+                                               E = InvTraits::child_end(W);
+         CI != E; ++CI) {
       typename InvTraits::NodeRef N = *CI;
----------------
Ranged?


https://reviews.llvm.org/D29705





More information about the llvm-commits mailing list