[PATCH] D38331: [Dominators] Add DFS number verification

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 08:40:08 PDT 2017


dberlin added inline comments.


================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:1395
+      // Make a copy and sort is such that it is possible to check if there are
+      // no gaps between DFS numbers of adjacent children.
+      auto Children = Node->getChildren();
----------------
My only concern here is that this mutates the tree in a verification function.
Given its verification, i would probably push the children and dfs numbers into a new vector, and sort + check that, to avoid mutating the tree.


https://reviews.llvm.org/D38331





More information about the llvm-commits mailing list