[llvm] r274942 - Lanai: Avoid implicit iterator conversions, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 15:11:31 PDT 2016
Author: dexonsmith
Date: Fri Jul 8 17:11:30 2016
New Revision: 274942
URL: http://llvm.org/viewvc/llvm-project?rev=274942&view=rev
Log:
Lanai: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Lanai backend.
Modified:
llvm/trunk/lib/Target/Lanai/LanaiFrameLowering.cpp
Modified: llvm/trunk/lib/Target/Lanai/LanaiFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiFrameLowering.cpp?rev=274942&r1=274941&r2=274942&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiFrameLowering.cpp Fri Jul 8 17:11:30 2016
@@ -70,16 +70,16 @@ void LanaiFrameLowering::replaceAdjDynAl
++MBB) {
MachineBasicBlock::iterator MBBI = MBB->begin();
while (MBBI != MBB->end()) {
- MachineInstr *MI = MBBI++;
- if (MI->getOpcode() == Lanai::ADJDYNALLOC) {
- DebugLoc DL = MI->getDebugLoc();
- unsigned Dst = MI->getOperand(0).getReg();
- unsigned Src = MI->getOperand(1).getReg();
+ MachineInstr &MI = *MBBI++;
+ if (MI.getOpcode() == Lanai::ADJDYNALLOC) {
+ DebugLoc DL = MI.getDebugLoc();
+ unsigned Dst = MI.getOperand(0).getReg();
+ unsigned Src = MI.getOperand(1).getReg();
BuildMI(*MBB, MI, DL, LII.get(Lanai::ADD_I_LO), Dst)
.addReg(Src)
.addImm(MaxCallFrameSize);
- MI->eraseFromParent();
+ MI.eraseFromParent();
}
}
}
More information about the llvm-commits
mailing list