summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-08-24 12:54:27 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-08-24 12:54:27 +0000
commitb12cf01908f0a6847f49523f956dacdfc40da3b7 (patch)
treea21c929c8f817d860aa9d63dd179897ef47b2c15 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
parent260de74e484e5db2657c5b2185e9dafea0bd6342 (diff)
downloadbcm5719-llvm-b12cf01908f0a6847f49523f956dacdfc40da3b7.tar.gz
bcm5719-llvm-b12cf01908f0a6847f49523f956dacdfc40da3b7.zip
Add a function object to compare the first or second component of a std::pair.
Replace instances of this scattered around the code base. llvm-svn: 189169
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 982dcc92b28..7eaf40c5540 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -690,15 +690,6 @@ void ScheduleDAGSDNodes::VerifyScheduledSequence(bool isBottomUp) {
}
#endif // NDEBUG
-namespace {
- struct OrderSorter {
- bool operator()(const std::pair<unsigned, MachineInstr*> &A,
- const std::pair<unsigned, MachineInstr*> &B) {
- return A.first < B.first;
- }
- };
-}
-
/// ProcessSDDbgValues - Process SDDbgValues associated with this node.
static void
ProcessSDDbgValues(SDNode *N, SelectionDAG *DAG, InstrEmitter &Emitter,
@@ -857,7 +848,7 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
// Sort the source order instructions and use the order to insert debug
// values.
- std::sort(Orders.begin(), Orders.end(), OrderSorter());
+ std::sort(Orders.begin(), Orders.end(), less_first());
SDDbgInfo::DbgIterator DI = DAG->DbgBegin();
SDDbgInfo::DbgIterator DE = DAG->DbgEnd();
OpenPOWER on IntegriCloud