[llvm] r314113 - Use {} instead of make_pair and an iterator for the insertion point, NFC
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 09:14:39 PDT 2017
Author: rnk
Date: Mon Sep 25 09:14:39 2017
New Revision: 314113
URL: http://llvm.org/viewvc/llvm-project?rev=314113&view=rev
Log:
Use {} instead of make_pair and an iterator for the insertion point, NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=314113&r1=314112&r2=314113&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Mon Sep 25 09:14:39 2017
@@ -717,7 +717,7 @@ ProcessSDDbgValues(SDNode *N, SelectionD
if (!Order || DVOrder == Order) {
MachineInstr *DbgMI = Emitter.EmitDbgValue(DVs[i], VRBaseMap);
if (DbgMI) {
- Orders.push_back(std::make_pair(DVOrder, DbgMI));
+ Orders.push_back({DVOrder, DbgMI});
BB->insert(InsertPos, DbgMI);
}
DVs[i]->setIsInvalidated();
@@ -742,16 +742,17 @@ ProcessSourceNode(SDNode *N, SelectionDA
}
MachineBasicBlock *BB = Emitter.getBlock();
- if (Emitter.getInsertPos() == BB->begin() || BB->back().isPHI() ||
+ auto IP = Emitter.getInsertPos();
+ if (IP == BB->begin() || BB->back().isPHI() ||
// Fast-isel may have inserted some instructions, in which case the
// BB->back().isPHI() test will not fire when we want it to.
- std::prev(Emitter.getInsertPos())->isPHI()) {
+ std::prev(IP)->isPHI()) {
// Did not insert any instruction.
- Orders.push_back(std::make_pair(Order, (MachineInstr*)nullptr));
+ Orders.push_back({Order, (MachineInstr *)nullptr});
return;
}
- Orders.push_back(std::make_pair(Order, &*std::prev(Emitter.getInsertPos())));
+ Orders.push_back({Order, &*std::prev(IP)});
ProcessSDDbgValues(N, DAG, Emitter, Orders, VRBaseMap, Order);
}
More information about the llvm-commits
mailing list