diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-04-30 18:29:51 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-04-30 18:29:51 +0000 |
commit | 41b977dffd868839089b5e8e54729ba14a0c4823 (patch) | |
tree | c19090c4ca36ae4fa5f601efb87e3c2857a060f7 /llvm/lib/CodeGen/PHIElimination.cpp | |
parent | deca70559335bf8dbe0876f2f974701725f26c28 (diff) | |
download | llvm-41b977dffd868839089b5e8e54729ba14a0c4823.zip llvm-41b977dffd868839089b5e8e54729ba14a0c4823.tar.gz llvm-41b977dffd868839089b5e8e54729ba14a0c4823.tar.bz2 |
Convert several loops over MachineFunction basic blocks to range-based loops
llvm-svn: 207683
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 37a7c71..65f4c72 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -532,9 +532,8 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, /// used later to determine when the vreg is killed in the BB. /// void PHIElimination::analyzePHINodes(const MachineFunction& MF) { - for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); - I != E; ++I) - for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end(); + for (const auto &MBB : MF) + for (MachineBasicBlock::const_iterator BBI = MBB.begin(), BBE = MBB.end(); BBI != BBE && BBI->isPHI(); ++BBI) for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2) ++VRegPHIUseCount[BBVRegPair(BBI->getOperand(i+1).getMBB()->getNumber(), |