aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-15 19:22:38 +0000
committerChris Lattner <sabre@nondot.org>2003-01-15 19:22:38 +0000
commit1531b6342151762b4f55e2a5c09f093e3e95fd78 (patch)
tree41154de16cb11f2462f8cd59c36ec1fb3f6a2588 /lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
parent83435fbaf98a89cc5d6f13a68bab7e52e8fb6cb3 (diff)
Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index db9058f3b3..8cd19adc85 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -302,73 +302,6 @@ GetMemInstArgs(InstructionNode* memInstrNode,
: ptrVal;
}
-
-//------------------------------------------------------------------------
-// Function Set2OperandsFromInstr
-// Function Set3OperandsFromInstr
-//
-// For the common case of 2- and 3-operand arithmetic/logical instructions,
-// set the m/c instr. operands directly from the VM instruction's operands.
-// Check whether the first or second operand is 0 and can use a dedicated "0"
-// register.
-// Check whether the second operand should use an immediate field or register.
-// (First and third operands are never immediates for such instructions.)
-//
-// Arguments:
-// canDiscardResult: Specifies that the result operand can be discarded
-// by using the dedicated "0"
-//
-// op1position, op2position and resultPosition: Specify in which position
-// in the machine instruction the 3 operands (arg1, arg2
-// and result) should go.
-//
-//------------------------------------------------------------------------
-
-void
-Set2OperandsFromInstr(MachineInstr* minstr,
- InstructionNode* vmInstrNode,
- const TargetMachine& target,
- bool canDiscardResult,
- int op1Position,
- int resultPosition)
-{
- Set3OperandsFromInstr(minstr, vmInstrNode, target,
- canDiscardResult, op1Position,
- /*op2Position*/ -1, resultPosition);
-}
-
-
-void
-Set3OperandsFromInstr(MachineInstr* minstr,
- InstructionNode* vmInstrNode,
- const TargetMachine& target,
- bool canDiscardResult,
- int op1Position,
- int op2Position,
- int resultPosition)
-{
- assert(op1Position >= 0);
- assert(resultPosition >= 0);
-
- // operand 1
- minstr->SetMachineOperandVal(op1Position, MachineOperand::MO_VirtualRegister,
- vmInstrNode->leftChild()->getValue());
-
- // operand 2 (if any)
- if (op2Position >= 0)
- minstr->SetMachineOperandVal(op2Position, MachineOperand::MO_VirtualRegister,
- vmInstrNode->rightChild()->getValue());
-
- // result operand: if it can be discarded, use a dead register if one exists
- if (canDiscardResult && target.getRegInfo().getZeroRegNum() >= 0)
- minstr->SetMachineOperandReg(resultPosition,
- target.getRegInfo().getZeroRegNum());
- else
- minstr->SetMachineOperandVal(resultPosition,
- MachineOperand::MO_VirtualRegister, vmInstrNode->getValue());
-}
-
-
MachineOperand::MachineOperandType
ChooseRegOrImmed(int64_t intValue,
bool isSigned,