[PATCH] D48383: [Dominators] Add the DomTreeUpdater class

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 11:26:20 PDT 2018


NutshellySima added inline comments.


================
Comment at: lib/IR/DomTreeUpdater.cpp:34
+  const bool HasEdge = llvm::any_of(
+      successors(From), [To](const BasicBlock *B) { return B == To; });
+
----------------
kuhar wrote:
> Still missed? Can we use llvm::find here?
It was commented when I used `std::any_of` last time. I then switched to `llvm::any_of`. I believe `llvm::any_of` is clearer than `llvm::find` because after `llvm::find` returns an iterator, and I need to have it compared with the `succ_end` to find out the value of this boolean.


https://reviews.llvm.org/D48383





More information about the llvm-commits mailing list