mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
[LCSSA] Use llvm::any_of instead of std::size_of.
The API is simpler. Suggested by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -53,8 +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 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));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user