diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2015-12-29 17:15:22 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2015-12-29 17:15:22 +0000 |
| commit | 7dd45697ca578874c96d9b938761f8d28d0d525e (patch) | |
| tree | d27f5be5086d56e5e800ec032033f3f21e76d48c | |
| parent | 87a8677e3d3c482b3131a1ff916e0b3dd3479175 (diff) | |
| download | bcm5719-llvm-7dd45697ca578874c96d9b938761f8d28d0d525e.tar.gz bcm5719-llvm-7dd45697ca578874c96d9b938761f8d28d0d525e.zip | |
use range-based for-loops; NFCI
llvm-svn: 256566
| -rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index deacb233f17..c550008da02 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -760,22 +760,19 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) { enterBasicBlock(MBB); if (SeenUnknownBackEdge) Loops.push_back(MBB); - for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; - ++I) - visitInstr(I); + for (MachineInstr &MI : *MBB) + visitInstr(&MI); processUndefReads(MBB); leaveBasicBlock(MBB); } // Visit all the loop blocks again in order to merge DomainValues from // back-edges. - for (unsigned i = 0, e = Loops.size(); i != e; ++i) { - MachineBasicBlock *MBB = Loops[i]; + for (MachineBasicBlock *MBB : Loops) { enterBasicBlock(MBB); - for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; - ++I) - if (!I->isDebugValue()) - processDefs(I, false); + for (MachineInstr &MI : *MBB) + if (!MI.isDebugValue()) + processDefs(&MI, false); processUndefReads(MBB); leaveBasicBlock(MBB); } |

