Make more use of the BuildMI API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55072 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-08-20 18:16:32 +00:00
parent 4cbe0662ab
commit cb34cd7b5e

View File

@ -150,7 +150,6 @@ unsigned FastISel::FastEmitInst_(unsigned MachineInstOpcode,
const TargetInstrDesc &II = TII->get(MachineInstOpcode);
MachineInstr *MI = BuildMI(*MF, II, ResultReg);
MBB->push_back(MI);
return ResultReg;
}
@ -162,9 +161,7 @@ unsigned FastISel::FastEmitInst_r(unsigned MachineInstOpcode,
unsigned ResultReg = MRI.createVirtualRegister(RC);
const TargetInstrDesc &II = TII->get(MachineInstOpcode);
MachineInstr *MI = BuildMI(*MF, II, ResultReg);
MI->addOperand(MachineOperand::CreateReg(Op0, false));
MachineInstr *MI = BuildMI(*MF, II, ResultReg).addReg(Op0);
MBB->push_back(MI);
return ResultReg;
}
@ -176,10 +173,7 @@ unsigned FastISel::FastEmitInst_rr(unsigned MachineInstOpcode,
unsigned ResultReg = MRI.createVirtualRegister(RC);
const TargetInstrDesc &II = TII->get(MachineInstOpcode);
MachineInstr *MI = BuildMI(*MF, II, ResultReg);
MI->addOperand(MachineOperand::CreateReg(Op0, false));
MI->addOperand(MachineOperand::CreateReg(Op1, false));
MachineInstr *MI = BuildMI(*MF, II, ResultReg).addReg(Op0).addReg(Op1);
MBB->push_back(MI);
return ResultReg;
}