Skip to content

Commit 3e21da1

Browse files
kazutakahiratajyli0116
authored andcommitted
[Utils] Use llvm::partition (NFC) (llvm#137494)
1 parent 8a144c0 commit 3e21da1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Utils/FixIrreducible.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ static void reconnectChildLoops(LoopInfo &LI, Loop *ParentLoop, Loop *NewLoop,
135135
: LI.getTopLevelLoopsVector();
136136
// Any candidate is a child iff its header is owned by the new loop. Move all
137137
// the children to a new vector.
138-
auto FirstChild = std::partition(
139-
CandidateLoops.begin(), CandidateLoops.end(), [&](Loop *L) {
140-
return NewLoop == L || !NewLoop->contains(L->getHeader());
141-
});
138+
auto FirstChild = llvm::partition(CandidateLoops, [&](Loop *L) {
139+
return NewLoop == L || !NewLoop->contains(L->getHeader());
140+
});
142141
SmallVector<Loop *, 8> ChildLoops(FirstChild, CandidateLoops.end());
143142
CandidateLoops.erase(FirstChild, CandidateLoops.end());
144143

0 commit comments

Comments
 (0)