Finish enumating code
authorChris Lattner <sabre@nondot.org>
Sun, 17 Nov 2002 22:33:54 +0000 (22:33 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Nov 2002 22:33:54 +0000 (22:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4726 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h

index 92045c3dcc6977817b017024191be7a20944285e..421d753d10e2c3fc23ea687d87d30c5d58045e6a 100644 (file)
@@ -383,7 +383,7 @@ public:
   /// addRegOperand - Add a MO_VirtualRegister operand to the end of the
   /// operands list...
   ///
-  void addRegOperand(Value *V, bool isDef=false, bool isDefAndUse=false) {
+  void addRegOperand(Value *V, bool isDef, bool isDefAndUse=false) {
     assert(!OperandsComplete() &&
            "Trying to add an operand to a machine instr that is already done!");
     operands.push_back(MachineOperand(V, MachineOperand::MO_VirtualRegister,
@@ -399,13 +399,22 @@ public:
 
   /// addRegOperand - Add a symbolic virtual register reference...
   ///
-  void addRegOperand(int reg, bool isDef = false) {
+  void addRegOperand(int reg, bool isDef) {
     assert(!OperandsComplete() &&
            "Trying to add an operand to a machine instr that is already done!");
     operands.push_back(MachineOperand(reg, MachineOperand::MO_VirtualRegister,
                                       isDef ? MOTy::Def : MOTy::Use));
   }
 
+  /// addRegOperand - Add a symbolic virtual register reference...
+  ///
+  void addRegOperand(int reg, MOTy::UseType UTy = MOTy::Use) {
+    assert(!OperandsComplete() &&
+           "Trying to add an operand to a machine instr that is already done!");
+    operands.push_back(MachineOperand(reg, MachineOperand::MO_VirtualRegister,
+                                      UTy));
+  }
+
   /// addPCDispOperand - Add a PC relative displacement operand to the MI
   ///
   void addPCDispOperand(Value *V) {
@@ -417,7 +426,7 @@ public:
 
   /// addMachineRegOperand - Add a virtual register operand to this MachineInstr
   ///
-  void addMachineRegOperand(int reg, bool isDef=false) {
+  void addMachineRegOperand(int reg, bool isDef) {
     assert(!OperandsComplete() &&
            "Trying to add an operand to a machine instr that is already done!");
     operands.push_back(MachineOperand(reg, MachineOperand::MO_MachineRegister,
@@ -425,6 +434,16 @@ public:
     insertUsedReg(reg);
   }
 
+  /// addMachineRegOperand - Add a virtual register operand to this MachineInstr
+  ///
+  void addMachineRegOperand(int reg, MOTy::UseType UTy = MOTy::Use) {
+    assert(!OperandsComplete() &&
+           "Trying to add an operand to a machine instr that is already done!");
+    operands.push_back(MachineOperand(reg, MachineOperand::MO_MachineRegister,
+                                      UTy));
+    insertUsedReg(reg);
+  }
+
   /// addZeroExtImmOperand - Add a zero extended constant argument to the
   /// machine instruction.
   ///