Minor beautification: fold a couple of lines of code.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Wed, 2 Jul 2003 01:24:00 +0000 (01:24 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Wed, 2 Jul 2003 01:24:00 +0000 (01:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7054 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index 613c16db751af454fcb9d3ba55e7093d03af72b5..ffb45d64130523eaab31c6ac5af55352703d791c 100644 (file)
@@ -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
     //
index 613c16db751af454fcb9d3ba55e7093d03af72b5..ffb45d64130523eaab31c6ac5af55352703d791c 100644 (file)
@@ -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
     //