[llvm] 9c356b2 - [Utils] Use llvm::partition (NFC) (#137494)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 26 23:28:10 PDT 2025
Author: Kazu Hirata
Date: 2025-04-26T23:28:07-07:00
New Revision: 9c356b233cf0abb81d8ef656823441881eba0651
URL: https://github.com/llvm/llvm-project/commit/9c356b233cf0abb81d8ef656823441881eba0651
DIFF: https://github.com/llvm/llvm-project/commit/9c356b233cf0abb81d8ef656823441881eba0651.diff
LOG: [Utils] Use llvm::partition (NFC) (#137494)
Added:
Modified:
llvm/lib/Transforms/Utils/FixIrreducible.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/FixIrreducible.cpp b/llvm/lib/Transforms/Utils/FixIrreducible.cpp
index 26df67263c209..45e1d12c2bfff 100644
--- a/llvm/lib/Transforms/Utils/FixIrreducible.cpp
+++ b/llvm/lib/Transforms/Utils/FixIrreducible.cpp
@@ -135,10 +135,9 @@ static void reconnectChildLoops(LoopInfo &LI, Loop *ParentLoop, Loop *NewLoop,
: LI.getTopLevelLoopsVector();
// Any candidate is a child iff its header is owned by the new loop. Move all
// the children to a new vector.
- auto FirstChild = std::partition(
- CandidateLoops.begin(), CandidateLoops.end(), [&](Loop *L) {
- return NewLoop == L || !NewLoop->contains(L->getHeader());
- });
+ auto FirstChild = llvm::partition(CandidateLoops, [&](Loop *L) {
+ return NewLoop == L || !NewLoop->contains(L->getHeader());
+ });
SmallVector<Loop *, 8> ChildLoops(FirstChild, CandidateLoops.end());
CandidateLoops.erase(FirstChild, CandidateLoops.end());
More information about the llvm-commits
mailing list