Skip to content

Commit

Permalink
minor speedup
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30065 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Sep 3, 2006
1 parent 5e50349 commit fbecc5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/CodeGen/LiveIntervalAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
numIntervalsAfter += getNumIntervals();

// perform a final pass over the instructions and compute spill
// weights, coalesce virtual registers and remove identity moves
// weights, coalesce virtual registers and remove identity moves.
const LoopInfo& loopInfo = getAnalysis<LoopInfo>();

for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
Expand All @@ -182,8 +182,8 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
++numPeep;
}
else {
for (unsigned i = 0; i < mii->getNumOperands(); ++i) {
const MachineOperand& mop = mii->getOperand(i);
for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) {
const MachineOperand &mop = mii->getOperand(i);
if (mop.isRegister() && mop.getReg() &&
MRegisterInfo::isVirtualRegister(mop.getReg())) {
// replace register with representative register
Expand Down

0 comments on commit fbecc5a

Please sign in to comment.