[llvm] r361134 - Use llvm::sort. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 03:18:35 PDT 2019
Author: maskray
Date: Mon May 20 03:18:35 2019
New Revision: 361134
URL: http://llvm.org/viewvc/llvm-project?rev=361134&view=rev
Log:
Use llvm::sort. NFC
Modified:
llvm/trunk/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
llvm/trunk/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
llvm/trunk/lib/Target/AMDGPU/GCNRegBankReassign.cpp
llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp
Modified: llvm/trunk/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp?rev=361134&r1=361133&r2=361134&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp Mon May 20 03:18:35 2019
@@ -47,10 +47,9 @@ Error DebugFrameDataSubsection::commit(B
}
std::vector<FrameData> SortedFrames(Frames.begin(), Frames.end());
- std::sort(SortedFrames.begin(), SortedFrames.end(),
- [](const FrameData &LHS, const FrameData &RHS) {
- return LHS.RvaStart < RHS.RvaStart;
- });
+ llvm::sort(SortedFrames, [](const FrameData &LHS, const FrameData &RHS) {
+ return LHS.RvaStart < RHS.RvaStart;
+ });
if (auto EC = Writer.writeArray(makeArrayRef(SortedFrames)))
return EC;
return Error::success();
Modified: llvm/trunk/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp?rev=361134&r1=361133&r2=361134&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp Mon May 20 03:18:35 2019
@@ -158,10 +158,8 @@ void JITLinkerBase::layOutAtoms() {
};
for (auto &KV : Layout) {
auto &SL = KV.second;
- std::sort(SL.ContentSections.begin(), SL.ContentSections.end(),
- CompareByOrdinal);
- std::sort(SL.ZeroFillSections.begin(), SL.ZeroFillSections.end(),
- CompareByOrdinal);
+ llvm::sort(SL.ContentSections, CompareByOrdinal);
+ llvm::sort(SL.ZeroFillSections, CompareByOrdinal);
}
}
@@ -188,10 +186,10 @@ void JITLinkerBase::layOutAtoms() {
OrderedLayoutHeads.push_back(DA);
// Now sort the list of layout heads by address.
- std::sort(OrderedLayoutHeads.begin(), OrderedLayoutHeads.end(),
- [](const DefinedAtom *LHS, const DefinedAtom *RHS) {
- return LHS->getAddress() < RHS->getAddress();
- });
+ llvm::sort(OrderedLayoutHeads,
+ [](const DefinedAtom *LHS, const DefinedAtom *RHS) {
+ return LHS->getAddress() < RHS->getAddress();
+ });
// Now populate the SI.Atoms field by appending each of the chains.
for (auto *DA : OrderedLayoutHeads) {
Modified: llvm/trunk/lib/Target/AMDGPU/GCNRegBankReassign.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/GCNRegBankReassign.cpp?rev=361134&r1=361133&r2=361134&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/GCNRegBankReassign.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/GCNRegBankReassign.cpp Mon May 20 03:18:35 2019
@@ -649,7 +649,7 @@ unsigned GCNRegBankReassign::tryReassign
}
}
}
- std::sort(BankStalls.begin(), BankStalls.end());
+ llvm::sort(BankStalls);
unsigned OrigReg = VRM->getPhys(C.Reg);
LRM->unassign(LI);
Modified: llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp?rev=361134&r1=361133&r2=361134&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp Mon May 20 03:18:35 2019
@@ -27,7 +27,6 @@
#include "llvm/IR/Function.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetOptions.h"
-#include <algorithm> // std::sort
using namespace llvm;
More information about the llvm-commits
mailing list