summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-12 01:39:01 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-12 01:39:01 +0000
commit4565ec0c1d85d7294659973761551a536835cf6d (patch)
tree809c0f6a8c4c87a0f103e34a5682767f28b973d1 /llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
parentef4b4491240b7991c20b6cb0d9096021f6be998b (diff)
downloadbcm5719-llvm-4565ec0c1d85d7294659973761551a536835cf6d.tar.gz
bcm5719-llvm-4565ec0c1d85d7294659973761551a536835cf6d.zip
SystemZ: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to MachineInstr* in the SystemZ backend, mainly by preferring MachineInstr& over MachineInstr* and using range-based for loops. llvm-svn: 275137
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index 072b64474f7..1ca92ef46e4 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -55,7 +55,7 @@ void SystemZInstrInfo::splitMove(MachineBasicBlock::iterator MI,
// Get two load or store instructions. Use the original instruction for one
// of them (arbitrarily the second here) and create a clone for the other.
- MachineInstr *EarlierMI = MF.CloneMachineInstr(MI);
+ MachineInstr *EarlierMI = MF.CloneMachineInstr(&*MI);
MBB->insert(MI, EarlierMI);
// Set up the two 64-bit registers.
@@ -496,8 +496,8 @@ static bool removeIPMBasedCompare(MachineInstr &Compare, unsigned SrcReg,
return false;
MachineBasicBlock::iterator MBBI = IPM, MBBE = Compare.getIterator();
for (++MBBI; MBBI != MBBE; ++MBBI) {
- MachineInstr *MI = MBBI;
- if (MI->modifiesRegister(SystemZ::CC, TRI))
+ MachineInstr &MI = *MBBI;
+ if (MI.modifiesRegister(SystemZ::CC, TRI))
return false;
}
OpenPOWER on IntegriCloud