diff options
author | Fangrui Song <maskray@google.com> | 2019-04-23 14:51:27 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-23 14:51:27 +0000 |
commit | efd94c56badf696ed7193f4a83c7a59f7dfbfc6e (patch) | |
tree | 63f7a8a57c367cf6ba845a80eda9177b62c516be /llvm/lib/CodeGen/MachineOutliner.cpp | |
parent | 99cf58339fceadee43ba3fdbf962a083cd5af6c4 (diff) | |
download | llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.zip llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.tar.gz llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.tar.bz2 |
Use llvm::stable_sort
While touching the code, simplify if feasible.
llvm-svn: 358996
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineOutliner.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index 7b1750a..0f3ed8a 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -1198,11 +1198,10 @@ bool MachineOutliner::outline(Module &M, unsigned OutlinedFunctionNum = 0; // Sort by benefit. The most beneficial functions should be outlined first. - std::stable_sort( - FunctionList.begin(), FunctionList.end(), - [](const OutlinedFunction &LHS, const OutlinedFunction &RHS) { - return LHS.getBenefit() > RHS.getBenefit(); - }); + llvm::stable_sort(FunctionList, [](const OutlinedFunction &LHS, + const OutlinedFunction &RHS) { + return LHS.getBenefit() > RHS.getBenefit(); + }); // Walk over each function, outlining them as we go along. Functions are // outlined greedily, based off the sort above. |