[llvm] r358738 - [MergeFunc] Use less_first() as the comparator of Schwartzian transform
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 22:49:29 PDT 2019
Author: maskray
Date: Thu Apr 18 22:49:29 2019
New Revision: 358738
URL: http://llvm.org/viewvc/llvm-project?rev=358738&view=rev
Log:
[MergeFunc] Use less_first() as the comparator of Schwartzian transform
Modified:
llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=358738&r1=358737&r2=358738&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Thu Apr 18 22:49:29 2019
@@ -403,12 +403,7 @@ bool MergeFunctions::runOnModule(Module
}
}
- std::stable_sort(
- HashedFuncs.begin(), HashedFuncs.end(),
- [](const std::pair<FunctionComparator::FunctionHash, Function *> &a,
- const std::pair<FunctionComparator::FunctionHash, Function *> &b) {
- return a.first < b.first;
- });
+ std::stable_sort(HashedFuncs.begin(), HashedFuncs.end(), less_first());
auto S = HashedFuncs.begin();
for (auto I = HashedFuncs.begin(), IE = HashedFuncs.end(); I != IE; ++I) {
More information about the llvm-commits
mailing list