[llvm] r274361 - CodeGen: Avoid implicit conversions in TargetInstrInfo, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 09:38:28 PDT 2016
Author: dexonsmith
Date: Fri Jul 1 11:38:28 2016
New Revision: 274361
URL: http://llvm.org/viewvc/llvm-project?rev=274361&view=rev
Log:
CodeGen: Avoid implicit conversions in TargetInstrInfo, NFC
Avoid implicit conversions from MachineBasicBlock::iterator to
MachineInstr* in TargetInstrInfo.
Modified:
llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
Modified: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp?rev=274361&r1=274360&r2=274361&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp Fri Jul 1 11:38:28 2016
@@ -552,7 +552,7 @@ MachineInstr *TargetInstrInfo::foldMemor
storeRegToStackSlot(*MBB, Pos, MO.getReg(), MO.isKill(), FI, RC, TRI);
else
loadRegFromStackSlot(*MBB, Pos, MO.getReg(), FI, RC, TRI);
- return --Pos;
+ return &*--Pos;
}
bool TargetInstrInfo::hasReassociableOperands(
@@ -793,7 +793,7 @@ MachineInstr *TargetInstrInfo::foldMemor
// Fold stackmap/patchpoint.
NewMI = foldPatchpoint(MF, MI, Ops, FrameIndex, *this);
if (NewMI)
- NewMI = MBB.insert(MI, NewMI);
+ NewMI = &*MBB.insert(MI, NewMI);
} else {
// Ask the target to do the actual folding.
NewMI = foldMemoryOperandImpl(MF, MI, Ops, MI, LoadMI, LIS);
More information about the llvm-commits
mailing list