[llvm] r274899 - SelectionDAG: Avoid implicit iterator conversions in FastISel, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 11:36:41 PDT 2016
Author: dexonsmith
Date: Fri Jul 8 13:36:41 2016
New Revision: 274899
URL: http://llvm.org/viewvc/llvm-project?rev=274899&view=rev
Log:
SelectionDAG: Avoid implicit iterator conversions in FastISel, NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=274899&r1=274898&r2=274899&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Fri Jul 8 13:36:41 2016
@@ -353,7 +353,8 @@ void FastISel::recomputeInsertPt() {
void FastISel::removeDeadCode(MachineBasicBlock::iterator I,
MachineBasicBlock::iterator E) {
- assert(I && E && std::distance(I, E) > 0 && "Invalid iterator!");
+ assert(static_cast<MachineInstr *>(I) && static_cast<MachineInstr *>(E) &&
+ std::distance(I, E) > 0 && "Invalid iterator!");
while (I != E) {
MachineInstr *Dead = &*I;
++I;
@@ -374,7 +375,7 @@ FastISel::SavePoint FastISel::enterLocal
void FastISel::leaveLocalValueArea(SavePoint OldInsertPt) {
if (FuncInfo.InsertPt != FuncInfo.MBB->begin())
- LastLocalValue = std::prev(FuncInfo.InsertPt);
+ LastLocalValue = &*std::prev(FuncInfo.InsertPt);
// Restore the previous insert position.
FuncInfo.InsertPt = OldInsertPt.InsertPt;
@@ -2075,7 +2076,7 @@ bool FastISel::handlePHINodesInSuccessor
FuncInfo.PHINodesToUpdate.resize(FuncInfo.OrigNumPHINodesToUpdate);
return false;
}
- FuncInfo.PHINodesToUpdate.push_back(std::make_pair(MBBI++, Reg));
+ FuncInfo.PHINodesToUpdate.push_back(std::make_pair(&*MBBI++, Reg));
DbgLoc = DebugLoc();
}
}
More information about the llvm-commits
mailing list