1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Remove default operands that are never used

llvm-svn: 4357
This commit is contained in:
Chris Lattner 2002-10-28 20:59:49 +00:00
parent de6ac9b0ff
commit 990e074c2e
2 changed files with 12 additions and 8 deletions

View File

@ -225,8 +225,8 @@ class MachineInstr : public Annotable, // MachineInstrs are annotable
// OperandComplete - Return true if it's illegal to add a new operand
bool OperandsComplete() const;
public:
MachineInstr(MachineOpCode Opcode, OpCodeMask OpcodeMask = 0);
MachineInstr(MachineOpCode Opcode, unsigned numOperands, OpCodeMask Mask = 0);
MachineInstr(MachineOpCode Opcode);
MachineInstr(MachineOpCode Opcode, unsigned numOperands);
/// MachineInstr ctor - This constructor only does a _reserve_ of the
/// operands, not a resize for them. It is expected that if you use this that

View File

@ -9,20 +9,24 @@ using std::cerr;
// Constructor for instructions with fixed #operands (nearly all)
MachineInstr::MachineInstr(MachineOpCode _opCode,
OpCodeMask _opCodeMask)
: opCode(_opCode), opCodeMask(_opCodeMask),
MachineInstr::MachineInstr(MachineOpCode _opCode)
: opCode(_opCode), opCodeMask(0),
operands(TargetInstrDescriptors[_opCode].numOperands, MachineOperand()) {
assert(TargetInstrDescriptors[_opCode].numOperands >= 0);
}
// Constructor for instructions with variable #operands
MachineInstr::MachineInstr(MachineOpCode OpCode, unsigned numOperands,
OpCodeMask OpCodeMask)
: opCode(OpCode), opCodeMask(OpCodeMask),
MachineInstr::MachineInstr(MachineOpCode OpCode, unsigned numOperands/*,
OpCodeMask OpCodeMask*/)
: opCode(OpCode), opCodeMask(0/*OpCodeMask*/),
operands(numOperands, MachineOperand()) {
}
MachineInstr::MachineInstr(MachineOpCode Opcode, unsigned numOperands,
bool XX, bool YY) : opCode(Opcode), opCodeMask(0) {
operands.reserve(numOperands);
}
// OperandComplete - Return true if it's illegal to add a new operand
bool MachineInstr::OperandsComplete() const {
int NumOperands = TargetInstrDescriptors[opCode].numOperands;