diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-08 18:36:41 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-08 18:36:41 +0000 |
commit | 10383ecd76d9f301903dd0c5ea8d91cfffe3e168 (patch) | |
tree | f93c4622ecb2413609bbc7196ea7486c4c23921a /llvm/lib/CodeGen/SelectionDAG | |
parent | 25b132e93b2b8b99c91463d381ac13a522048a61 (diff) | |
download | bcm5719-llvm-10383ecd76d9f301903dd0c5ea8d91cfffe3e168.tar.gz bcm5719-llvm-10383ecd76d9f301903dd0c5ea8d91cfffe3e168.zip |
SelectionDAG: Avoid implicit iterator conversions in FastISel, NFC
llvm-svn: 274899
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index a0855365909..b1f2d13efde 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -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::enterLocalValueArea() { 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::handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB) { 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(); } } |