[PATCH] D22166: Lanai: Avoid implicit iterator conversions, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 12:32:04 PDT 2016
dexonsmith created this revision.
dexonsmith added a subscriber: llvm-commits.
Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the Lanai backend.
http://reviews.llvm.org/D22166
Files:
lib/Target/Lanai/LanaiFrameLowering.cpp
Index: lib/Target/Lanai/LanaiFrameLowering.cpp
===================================================================
--- lib/Target/Lanai/LanaiFrameLowering.cpp
+++ lib/Target/Lanai/LanaiFrameLowering.cpp
@@ -70,16 +70,16 @@
++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();
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22166.63297.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/1f4c924b/attachment.bin>
More information about the llvm-commits
mailing list