From 73df3bfb682bdff7cdcc3da2dcbdc68a60ebdd7f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Jan 2003 17:35:44 +0000 Subject: [PATCH] Remove a ton of functions that are no longer used, instead using BuildMI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5290 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/InstrSelectionSupport.h | 149 ------------------- 1 file changed, 149 deletions(-) diff --git a/include/llvm/CodeGen/InstrSelectionSupport.h b/include/llvm/CodeGen/InstrSelectionSupport.h index 50f2c08bee9..d1704170c0c 100644 --- a/include/llvm/CodeGen/InstrSelectionSupport.h +++ b/include/llvm/CodeGen/InstrSelectionSupport.h @@ -100,155 +100,6 @@ void Set3OperandsFromInstr (MachineInstr* minstr, int resultPosition = 2); -//------------------------------------------------------------------------ -// Common machine instruction operand combinations -// to simplify code generation. -//------------------------------------------------------------------------ - -inline MachineInstr* -Create1OperandInstr(MachineOpCode opCode, Value* argVal1) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, argVal1); - return M; -} - -inline MachineInstr* -Create1OperandInstr_UImmed(MachineOpCode opCode, unsigned unextendedImmed) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandConst(0, MachineOperand::MO_UnextendedImmed, - unextendedImmed); - return M; -} - -inline MachineInstr* -Create1OperandInstr_SImmed(MachineOpCode opCode, int signExtendedImmed) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandConst(0, MachineOperand::MO_SignExtendedImmed, - signExtendedImmed); - return M; -} - -inline MachineInstr* -Create1OperandInstr_Addr(MachineOpCode opCode, Value* label) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_PCRelativeDisp, label); - return M; -} - -inline MachineInstr* -Create2OperandInstr(MachineOpCode opCode, Value* argVal1, Value* argVal2) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, argVal1); - M->SetMachineOperandVal(1, MachineOperand::MO_VirtualRegister, argVal2); - return M; -} - -inline MachineInstr* -Create2OperandInstr(MachineOpCode opCode, - Value* argVal1, MachineOperand::MachineOperandType type1, - Value* argVal2, MachineOperand::MachineOperandType type2) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, type1, argVal1); - M->SetMachineOperandVal(1, type2, argVal2); - return M; -} - - -inline MachineInstr* -Create2OperandInstr_UImmed(MachineOpCode opCode, - unsigned unextendedImmed, Value* argVal2) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandConst(0, MachineOperand::MO_UnextendedImmed, - unextendedImmed); - M->SetMachineOperandVal(1, MachineOperand::MO_VirtualRegister, argVal2); - return M; -} - -inline MachineInstr* -Create2OperandInstr_SImmed(MachineOpCode opCode, - int signExtendedImmed, Value* argVal2) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandConst(0, MachineOperand::MO_SignExtendedImmed, - signExtendedImmed); - M->SetMachineOperandVal(1, MachineOperand::MO_VirtualRegister, argVal2); - return M; -} - -inline MachineInstr* -Create2OperandInstr_Addr(MachineOpCode opCode, - Value* label, Value* argVal2) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_PCRelativeDisp, label); - M->SetMachineOperandVal(1, MachineOperand::MO_VirtualRegister, argVal2); - return M; -} - -inline MachineInstr* -Create2OperandInstr_Reg(MachineOpCode opCode, - Value* argVal1, unsigned regNum) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, argVal1); - M->SetMachineOperandReg(1, regNum); - return M; -} - -inline MachineInstr* -Create2OperandInstr_Reg(MachineOpCode opCode, - unsigned regNum1, unsigned regNum2) - -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandReg(0, regNum1); - M->SetMachineOperandReg(1, regNum2); - return M; -} - -inline MachineInstr* -Create3OperandInstr_Reg(MachineOpCode opCode, Value* argVal1, - unsigned regNum, Value* argVal3) -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, argVal1); - M->SetMachineOperandReg(1, regNum); - M->SetMachineOperandVal(2, MachineOperand::MO_VirtualRegister, argVal3); - return M; -} - -inline MachineInstr* -Create3OperandInstr_Reg(MachineOpCode opCode, unsigned regNum1, - unsigned regNum2, Value* argVal3) - -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandReg(0, regNum1); - M->SetMachineOperandReg(1, regNum2); - M->SetMachineOperandVal(2, MachineOperand::MO_VirtualRegister, argVal3); - return M; -} - -inline MachineInstr* -Create3OperandInstr_Reg(MachineOpCode opCode, unsigned regNum1, - unsigned regNum2, unsigned regNum3) - -{ - MachineInstr* M = new MachineInstr(opCode); - M->SetMachineOperandReg(0, regNum1); - M->SetMachineOperandReg(1, regNum2); - M->SetMachineOperandReg(2, regNum3); - return M; -} - - //--------------------------------------------------------------------------- // Function: ChooseRegOrImmed // -- 2.34.1