aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp5
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index 613c16db75..ffb45d6413 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -200,11 +200,10 @@ void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst,
if (DEBUG_RA >= RA_DEBUG_Interference)
cerr << "\n For call inst: " << *MInst;
- ValueSet::const_iterator LIt = LVSetAft->begin();
-
// for each live var in live variable set after machine inst
//
- for ( ; LIt != LVSetAft->end(); ++LIt) {
+ for (ValueSet::const_iterator LIt = LVSetAft->begin(), LEnd = LVSetAft->end();
+ LIt != LEnd; ++LIt) {
// get the live range corresponding to live var
//
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 613c16db75..ffb45d6413 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -200,11 +200,10 @@ void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst,
if (DEBUG_RA >= RA_DEBUG_Interference)
cerr << "\n For call inst: " << *MInst;
- ValueSet::const_iterator LIt = LVSetAft->begin();
-
// for each live var in live variable set after machine inst
//
- for ( ; LIt != LVSetAft->end(); ++LIt) {
+ for (ValueSet::const_iterator LIt = LVSetAft->begin(), LEnd = LVSetAft->end();
+ LIt != LEnd; ++LIt) {
// get the live range corresponding to live var
//