From: Vikram S. Adve Date: Wed, 2 Jul 2003 01:24:00 +0000 (+0000) Subject: Minor beautification: fold a couple of lines of code. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=65b2f401afbaa4a87f0dd4a51cd1f177c7c15e40;p=oota-llvm.git Minor beautification: fold a couple of lines of code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7054 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 613c16db751..ffb45d64130 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 613c16db751..ffb45d64130 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 //