[PATCH] D32614: [GVNHoist] Fix: PR32821, add check for anticipability in case of infinite loops
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 15:22:35 PDT 2017
dberlin added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:334
+ for (const BasicBlock *Succ : BB->getTerminator()->successors()) {
+ if (Remaining.count(Succ)) // Loop.
+ return false;
----------------
You can just use the return value of insert.
https://reviews.llvm.org/D32614
More information about the llvm-commits
mailing list