[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 17 16:35:01 PST 2002


Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.86 -> 1.87

---
Log message:

Finish enumating code


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.86 llvm/include/llvm/CodeGen/MachineInstr.h:1.87
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.86	Sun Nov 17 16:14:22 2002
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Sun Nov 17 16:33:54 2002
@@ -383,7 +383,7 @@
   /// 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 @@
 
   /// 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,11 +426,21 @@
 
   /// 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,
                                       isDef ? MOTy::Def : MOTy::Use));
+    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);
   }
 





More information about the llvm-commits mailing list