Final version of BuildMI for symmetry and because I want to use it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-12-13 09:33:06 +00:00
parent ed6902ca89
commit 367ccab06e

View File

@ -91,6 +91,17 @@ inline MachineInstrBuilder BuildMI(MachineOpCode Opcode, unsigned NumOperands) {
return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands, true, true));
}
/// BuildMI - This version of the builder also sets up the first "operand" as a
/// destination virtual register. NumOperands is the number of additional add*
/// calls that are expected, it does not include the destination register.
///
inline MachineInstrBuilder BuildMI(MachineOpCode Opcode, unsigned NumOperands,
unsigned DestReg) {
return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands+1,
true, true)).addReg(DestReg, MOTy::Def);
}
/// BuildMI - This version of the builder inserts the built MachineInstr into
/// the specified MachineBasicBlock.
///