diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-02-25 09:54:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-02-25 09:54:52 +0000 |
commit | 404cb4f9fa2df50eac4d84b8a77c84a92188c6d5 (patch) | |
tree | baf5af33b59652d826500e5b0a678856c5ed5d68 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | 05b53740e21ca0ce342f13b05c238134030420fb (diff) |
Added an offset field to ConstantPoolSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index b72bf20fd1..a4e8854d25 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1028,19 +1028,19 @@ public: class GlobalAddressSDNode : public SDNode { GlobalValue *TheGlobal; - int offset; + int Offset; protected: friend class SelectionDAG; GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT, int o=0) - : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT) { + : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT), + Offset(o) { TheGlobal = const_cast<GlobalValue*>(GA); - offset = o; } public: GlobalValue *getGlobal() const { return TheGlobal; } - int getOffset() const { return offset; } + int getOffset() const { return Offset; } static bool classof(const GlobalAddressSDNode *) { return true; } static bool classof(const SDNode *N) { @@ -1069,19 +1069,22 @@ public: class ConstantPoolSDNode : public SDNode { Constant *C; + int Offset; unsigned Alignment; protected: friend class SelectionDAG; - ConstantPoolSDNode(Constant *c, MVT::ValueType VT, bool isTarget) + ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, + int o=0) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT), - C(c), Alignment(0) {} - ConstantPoolSDNode(Constant *c, MVT::ValueType VT, unsigned Align, - bool isTarget) + C(c), Offset(o), Alignment(0) {} + ConstantPoolSDNode(bool isTarget, Constant *c, MVT::ValueType VT, int o, + unsigned Align) : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT), - C(c), Alignment(Align) {} + C(c), Offset(o), Alignment(Align) {} public: Constant *get() const { return C; } + int getOffset() const { return Offset; } // Return the alignment of this constant pool object, which is either 0 (for // default alignment) or log2 of the desired value. |