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/SplitKit.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/SplitKit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 1e0f1e14d4a..16fe9790105 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -131,11 +131,9 @@ void SplitAnalysis::analyzeUses() { // Get use slots form the use-def chain. const MachineRegisterInfo &MRI = MF.getRegInfo(); - for (MachineRegisterInfo::use_nodbg_iterator - I = MRI.use_nodbg_begin(CurLI->reg), E = MRI.use_nodbg_end(); I != E; - ++I) - if (!I->isUndef()) - UseSlots.push_back(LIS.getInstructionIndex(I->getParent()).getRegSlot()); + for (MachineOperand &MO : MRI.use_nodbg_operands(CurLI->reg)) + if (!MO.isUndef()) + UseSlots.push_back(LIS.getInstructionIndex(MO.getParent()).getRegSlot()); array_pod_sort(UseSlots.begin(), UseSlots.end()); |