aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-03 07:53:50 +0000
committerChris Lattner <sabre@nondot.org>2006-09-03 07:53:50 +0000
commitfbecc5a593da0a5b4d9ff6be63c5558060e31e43 (patch)
tree11c5191adb96bb86fa6e3ecfcf756a012e3e3315 /lib
parent5e50349070972ca4e590f6211184df1d4ec28ac8 (diff)
minor speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index fc9015ee99..ba9bc9f867 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/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