aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineOperand.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-30 06:11:04 +0000
committerChris Lattner <sabre@nondot.org>2007-12-30 06:11:04 +0000
commite12d6abfdfc5141b2001f0c369a0e1525315b9c0 (patch)
tree88f0fe4768ae766ed3d430cda88722d3c731ff33 /include/llvm/CodeGen/MachineOperand.h
parent271000d54504531b3e1056403a2bdf8453fae097 (diff)
make machine operands fatter: give each one an up-pointer to the
machineinstr that owns it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r--include/llvm/CodeGen/MachineOperand.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index 49d7245e67..a092fb45d8 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/include/llvm/CodeGen/MachineOperand.h
@@ -23,7 +23,8 @@ namespace llvm {
class MachineBasicBlock;
class GlobalValue;
-
+ class MachineInstr;
+
/// MachineOperand class - Representation of each machine instruction operand.
///
class MachineOperand {
@@ -48,6 +49,9 @@ private:
int64_t immedVal; // For MO_Immediate and MO_*Index.
} contents;
+ /// ParentMI - This is the instruction that this operand is embedded into.
+ MachineInstr *ParentMI;
+
MachineOperandType opType:8; // Discriminate the union.
bool IsDef : 1; // True if this is a def, false if this is a use.
bool IsImp : 1; // True if this is an implicit def or use.
@@ -69,7 +73,7 @@ private:
unsigned char subReg;
} auxInfo;
- MachineOperand() {}
+ MachineOperand() : ParentMI(0) {}
void print(std::ostream &os) const;
void print(std::ostream *os) const { if (os) print(*os); }
@@ -335,6 +339,7 @@ public:
IsDead = MO.IsDead;
opType = MO.opType;
auxInfo = MO.auxInfo;
+ ParentMI = MO.ParentMI;
return *this;
}