diff options
author | Owen Anderson <resistor@mac.com> | 2014-03-17 19:36:09 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2014-03-17 19:36:09 +0000 |
commit | b36376efcb0f75963a0236447cc7dffba14f5ada (patch) | |
tree | 4e85136095d62a518abc93becb1001eb05b42fad /llvm/lib/CodeGen/TailDuplication.cpp | |
parent | 900b4807fe9de06d94ac0a1b52fd009f694ee481 (diff) | |
download | bcm5719-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/TailDuplication.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TailDuplication.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TailDuplication.cpp b/llvm/lib/CodeGen/TailDuplication.cpp index df28c3938ad..40ce2b6cbba 100644 --- a/llvm/lib/CodeGen/TailDuplication.cpp +++ b/llvm/lib/CodeGen/TailDuplication.cpp @@ -338,12 +338,10 @@ bool TailDuplicatePass::TailDuplicateBlocks(MachineFunction &MF) { static bool isDefLiveOut(unsigned Reg, MachineBasicBlock *BB, const MachineRegisterInfo *MRI) { - for (MachineRegisterInfo::use_instr_iterator UI = MRI->use_instr_begin(Reg), - UE = MRI->use_instr_end(); UI != UE; ++UI) { - MachineInstr *UseMI = &*UI; - if (UseMI->isDebugValue()) + for (MachineInstr &UseMI : MRI->use_instructions(Reg)) { + if (UseMI.isDebugValue()) continue; - if (UseMI->getParent() != BB) + if (UseMI.getParent() != BB) return true; } return false; |