[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 28 15:01:03 PST 2002
Changes in directory llvm/lib/CodeGen:
MachineInstr.cpp updated: 1.52 -> 1.53
---
Log message:
Remove default operands that are never used
---
Diffs of the changes:
Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.52 llvm/lib/CodeGen/MachineInstr.cpp:1.53
--- llvm/lib/CodeGen/MachineInstr.cpp:1.52 Mon Oct 28 14:48:39 2002
+++ llvm/lib/CodeGen/MachineInstr.cpp Mon Oct 28 14:59:49 2002
@@ -9,18 +9,22 @@
// 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
More information about the llvm-commits
mailing list