summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackSlotColoring.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-23 14:51:27 +0000
committerFangrui Song <maskray@google.com>2019-04-23 14:51:27 +0000
commitefd94c56badf696ed7193f4a83c7a59f7dfbfc6e (patch)
tree63f7a8a57c367cf6ba845a80eda9177b62c516be /llvm/lib/CodeGen/StackSlotColoring.cpp
parent99cf58339fceadee43ba3fdbf962a083cd5af6c4 (diff)
downloadbcm5719-llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.tar.gz
bcm5719-llvm-efd94c56badf696ed7193f4a83c7a59f7dfbfc6e.zip
Use llvm::stable_sort
While touching the code, simplify if feasible. llvm-svn: 358996
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
-rw-r--r--llvm/lib/CodeGen/StackSlotColoring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp
index 60893f49070..99b533e10b8 100644
--- a/llvm/lib/CodeGen/StackSlotColoring.cpp
+++ b/llvm/lib/CodeGen/StackSlotColoring.cpp
@@ -242,7 +242,7 @@ void StackSlotColoring::InitializeSlots() {
LLVM_DEBUG(dbgs() << '\n');
// Sort them by weight.
- std::stable_sort(SSIntervals.begin(), SSIntervals.end(), IntervalSorter());
+ llvm::stable_sort(SSIntervals, IntervalSorter());
NextColors.resize(AllColors.size());
@@ -347,7 +347,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
li->weight = SlotWeights[SS];
}
// Sort them by new weight.
- std::stable_sort(SSIntervals.begin(), SSIntervals.end(), IntervalSorter());
+ llvm::stable_sort(SSIntervals, IntervalSorter());
#ifndef NDEBUG
for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i)
OpenPOWER on IntegriCloud