summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2014-03-17 19:36:09 +0000
committerOwen Anderson <resistor@mac.com>2014-03-17 19:36:09 +0000
commitb36376efcb0f75963a0236447cc7dffba14f5ada (patch)
tree4e85136095d62a518abc93becb1001eb05b42fad /llvm/lib/CodeGen/LiveRangeEdit.cpp
parent900b4807fe9de06d94ac0a1b52fd009f694ee481 (diff)
downloadbcm5719-llvm-b36376efcb0f75963a0236447cc7dffba14f5ada.tar.gz
bcm5719-llvm-b36376efcb0f75963a0236447cc7dffba14f5ada.zip
Switch a number of loops in lib/CodeGen over to range-based for-loops, now that
the MachineRegisterInfo iterators are compatible with it. llvm-svn: 204075
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index c7372592854..891eaab1a59 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -167,10 +167,8 @@ bool LiveRangeEdit::foldAsLoad(LiveInterval *LI,
MachineInstr *DefMI = 0, *UseMI = 0;
// Check that there is a single def and a single use.
- for (MachineRegisterInfo::reg_nodbg_iterator I = MRI.reg_nodbg_begin(LI->reg),
- E = MRI.reg_nodbg_end(); I != E; ++I) {
- MachineOperand &MO = *I;
- MachineInstr *MI = I->getParent();
+ for (MachineOperand &MO : MRI.reg_nodbg_operands(LI->reg)) {
+ MachineInstr *MI = MO.getParent();
if (MO.isDef()) {
if (DefMI && DefMI != MI)
return false;
OpenPOWER on IntegriCloud