[llvm] r269800 - [LCSSA] Use llvm::any_of instead of std::size_of.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 12:01:03 PDT 2016
Author: davide
Date: Tue May 17 14:01:02 2016
New Revision: 269800
URL: http://llvm.org/viewvc/llvm-project?rev=269800&view=rev
Log:
[LCSSA] Use llvm::any_of instead of std::size_of.
The API is simpler. Suggested by David Blaikie!
Modified:
llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=269800&r1=269799&r2=269800&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Tue May 17 14:01:02 2016
@@ -53,8 +53,7 @@ STATISTIC(NumLCSSA, "Number of live out
/// Return true if the specified block is in the list.
static bool isExitBlock(BasicBlock *BB,
const SmallVectorImpl<BasicBlock *> &ExitBlocks) {
- return std::any_of(ExitBlocks.begin(), ExitBlocks.end(),
- [&](BasicBlock *EB) { return EB == BB; });
+ return llvm::any_of(ExitBlocks, [&](BasicBlock *EB) { return EB == BB; });
}
/// Given an instruction in the loop, check to see if it has any uses that are
@@ -208,7 +207,7 @@ blockDominatesAnExit(BasicBlock *BB,
DominatorTree &DT,
const SmallVectorImpl<BasicBlock *> &ExitBlocks) {
DomTreeNode *DomNode = DT.getNode(BB);
- return std::any_of(ExitBlocks.begin(), ExitBlocks.end(), [&](BasicBlock *EB) {
+ return llvm::any_of(ExitBlocks, [&](BasicBlock * EB) {
return DT.dominates(DomNode, DT.getNode(EB));
});
}
More information about the llvm-commits
mailing list