OSDN Git Service

[LCSSA] Simplify. Suggested by Sanjoy.
authorDavide Italiano <davide@freebsd.org>
Fri, 27 May 2016 20:25:31 +0000 (20:25 +0000)
committerDavide Italiano <davide@freebsd.org>
Fri, 27 May 2016 20:25:31 +0000 (20:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271041 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LCSSA.cpp

index 94c531d..ba63451 100644 (file)
@@ -53,7 +53,7 @@ STATISTIC(NumLCSSA, "Number of live out of a loop variables");
 /// Return true if the specified block is in the list.
 static bool isExitBlock(BasicBlock *BB,
                         const SmallVectorImpl<BasicBlock *> &ExitBlocks) {
-  return llvm::any_of(ExitBlocks, [&](BasicBlock *EB) { return EB == BB; });
+  return find(ExitBlocks, BB) != ExitBlocks.end();
 }
 
 /// Given an instruction in the loop, check to see if it has any uses that are