aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-17 22:33:54 +0000
committerChris Lattner <sabre@nondot.org>2002-11-17 22:33:54 +0000
commit23e6bba592af68ba991ee6900978e81eb21a08af (patch)
treece0f63558398fdceacb52f2cfa4d038b8ea010db /include/llvm/CodeGen/MachineInstr.h
parent71e83caecd0ea8cd0dea214e0d2091709aabf665 (diff)
Finish enumating code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 92045c3dcc..421d753d10 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -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.
///