Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9523062

Browse filesBrowse files
[BOLT] Use llvm::max_element (NFC) (#140342)
1 parent 7b8bc1b commit 9523062
Copy full SHA for 9523062

File tree

1 file changed

+4
-5
lines changed
Filter options

1 file changed

+4
-5
lines changed

‎bolt/lib/Passes/PettisAndHansen.cpp

Copy file name to clipboardExpand all lines: bolt/lib/Passes/PettisAndHansen.cpp
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,10 @@ std::vector<Cluster> pettisAndHansen(const CallGraph &Cg) {
143143
// Find an arc with max weight and merge its nodes
144144

145145
while (!Carcs.empty()) {
146-
auto Maxpos =
147-
std::max_element(Carcs.begin(), Carcs.end(),
148-
[&](const ClusterArc &Carc1, const ClusterArc &Carc2) {
149-
return Carc1.Weight < Carc2.Weight;
150-
});
146+
auto Maxpos = llvm::max_element(
147+
Carcs, [&](const ClusterArc &Carc1, const ClusterArc &Carc2) {
148+
return Carc1.Weight < Carc2.Weight;
149+
});
151150

152151
ClusterArc Max = *Maxpos;
153152
Carcs.erase(Maxpos);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.