Don't recompute getNumOperands for each iteration.

llvm-svn: 31783
This commit is contained in:
Bill Wendling 2006-11-16 07:35:18 +00:00
parent 9cea24d40e
commit bcd11344e9

View File

@ -277,7 +277,7 @@ LiveIntervals::CreateNewLiveInterval(const LiveInterval *LI,
MachineInstr *MI = getInstructionFromIndex(Index);
for (unsigned J = 0; J != MI->getNumOperands(); ++J) {
for (unsigned J = 0, e = MI->getNumOperands(); J != e; ++J) {
MachineOperand &MOp = MI->getOperand(J);
if (MOp.isRegister() && rep(MOp.getReg()) == LI->reg)
MOp.setReg(NewVReg);