Index: src/IceOperand.h |
diff --git a/src/IceOperand.h b/src/IceOperand.h |
index bc48b74da0639623550479d341a400dc5ec01dde..2c1fc5dca9030397d056f3d7023f98aa0000e8f3 100644 |
--- a/src/IceOperand.h |
+++ b/src/IceOperand.h |
@@ -94,6 +94,10 @@ public: |
virtual ~Operand() = default; |
+ CfgNode *getDefNode() const { return DefNode; } |
+ |
+ void setDefNode(CfgNode *node) { this->DefNode = node; } |
+ |
protected: |
Operand(OperandKind Kind, Type Ty) : Ty(Ty), Kind(Kind) { |
// It is undefined behavior to have a larger value in the enum |
@@ -105,6 +109,8 @@ protected: |
/// Vars and NumVars are initialized by the derived class. |
SizeT NumVars = 0; |
Variable **Vars = nullptr; |
+ |
+ CfgNode *DefNode = nullptr; |
}; |
template <class StreamType> |
@@ -739,6 +745,9 @@ public: |
return Kind >= kVariable && Kind <= kVariable_Max; |
} |
+ void setDefiningInst(Inst *I) { DefiningInst = I; } |
+ Inst *getDefiningInst() const { return DefiningInst; } |
+ |
protected: |
Variable(OperandKind K, Type Ty, SizeT Index) |
: Operand(K, Ty), Number(Index), |
@@ -772,6 +781,8 @@ protected: |
LiveRange Live; |
/// VarsReal (and Operand::Vars) are set up such that Vars[0] == this. |
Variable *VarsReal[1]; |
+ /// A pointer to the instruction of which this is the destination. |
+ Inst *DefiningInst = nullptr; |
Jim Stichnoth
2016/03/29 17:49:57
I'm not super excited about increasing the size of
Eric Holk
2016/03/29 22:58:07
I added a couple unordered_maps and removed the ex
|
}; |
// Variable64On32 represents a 64-bit variable on a 32-bit architecture. In |