summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-04-30 18:29:51 +0000
committerAlexey Samsonov <samsonov@google.com>2014-04-30 18:29:51 +0000
commit41b977dffd868839089b5e8e54729ba14a0c4823 (patch)
treec19090c4ca36ae4fa5f601efb87e3c2857a060f7 /llvm/lib/CodeGen/LiveVariables.cpp
parentdeca70559335bf8dbe0876f2f974701725f26c28 (diff)
downloadbcm5719-llvm-41b977dffd868839089b5e8e54729ba14a0c4823.tar.gz
bcm5719-llvm-41b977dffd868839089b5e8e54729ba14a0c4823.zip
Convert several loops over MachineFunction basic blocks to range-based loops
llvm-svn: 207683
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index ed313845349..b372ce030f9 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -701,9 +701,8 @@ void LiveVariables::removeVirtualRegistersKilled(MachineInstr *MI) {
/// which is used in a PHI node. We map that to the BB the vreg is coming from.
///
void LiveVariables::analyzePHINodes(const MachineFunction& Fn) {
- for (MachineFunction::const_iterator I = Fn.begin(), E = Fn.end();
- I != E; ++I)
- for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end();
+ for (const auto &MBB : Fn)
+ 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)
if (BBI->getOperand(i).readsReg())
OpenPOWER on IntegriCloud