diff options
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 9a8789cfe55..9d2e38e19da 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -177,9 +177,8 @@ bool Loop::isRecursivelyLCSSAForm(DominatorTree &DT) const { if (!isLCSSAForm(DT)) return false; - return std::all_of(begin(), end(), [&](const Loop *L) { - return L->isRecursivelyLCSSAForm(DT); - }); + return all_of(*this, + [&](const Loop *L) { return L->isRecursivelyLCSSAForm(DT); }); } bool Loop::isLoopSimplifyForm() const { @@ -366,8 +365,7 @@ Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock *> &ExitBlocks) const { // In case of multiple edges from current block to exit block, collect // only one edge in ExitBlocks. Use switchExitBlocks to keep track of // duplicate edges. - if (std::find(SwitchExitBlocks.begin(), SwitchExitBlocks.end(), Successor) - == SwitchExitBlocks.end()) { + if (!is_contained(SwitchExitBlocks, Successor)) { SwitchExitBlocks.push_back(Successor); ExitBlocks.push_back(Successor); } @@ -536,8 +534,7 @@ Loop *UnloopUpdater::getNearestLoop(BasicBlock *BB, Loop *BBLoop) { assert(Subloop && "subloop is not an ancestor of the original loop"); } // Get the current nearest parent of the Subloop exits, initially Unloop. - NearLoop = - SubloopParents.insert(std::make_pair(Subloop, &Unloop)).first->second; + NearLoop = SubloopParents.insert({Subloop, &Unloop}).first->second; } succ_iterator I = succ_begin(BB), E = succ_end(BB); |