diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-03 07:53:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-03 07:53:50 +0000 |
commit | 774785a79d14c95d467dd0224761723d51b5f9da (patch) | |
tree | 96c38688de852a15dd4f32c35783e5edbb2b735e /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 7cc20d418baf8d5c82ad68174430b2f3dfd8b313 (diff) | |
download | bcm5719-llvm-774785a79d14c95d467dd0224761723d51b5f9da.tar.gz bcm5719-llvm-774785a79d14c95d467dd0224761723d51b5f9da.zip |
minor speedup
llvm-svn: 30065
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index fc9015ee999..ba9bc9f8678 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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(); @@ -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 |