diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-25 05:02:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-25 05:02:41 +0000 |
commit | aaaaf79d4aaa172c2f2ae0e327bbae523a045bf5 (patch) | |
tree | 173aac855c58ffae1a952850e5bd4cbfe86b5c60 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | ca739c685b963b103ae2d201e038ac37e7af4b29 (diff) |
Add support for TargetConstantPool node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 319403ca3c..9f1769e0d6 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -66,6 +66,7 @@ namespace ISD { // dag, turning into a GlobalAddress operand. TargetGlobalAddress, TargetFrameIndex, + TargetConstantPool, // CopyToReg - This node has three operands: a chain, a register number to // set to this value, and a value. @@ -830,15 +831,17 @@ class ConstantPoolSDNode : public SDNode { unsigned CPI; protected: friend class SelectionDAG; - ConstantPoolSDNode(unsigned cpi, MVT::ValueType VT) - : SDNode(ISD::ConstantPool, VT), CPI(cpi) {} + ConstantPoolSDNode(unsigned cpi, MVT::ValueType VT, bool isTarget) + : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT), + CPI(cpi) {} public: unsigned getIndex() const { return CPI; } static bool classof(const ConstantPoolSDNode *) { return true; } static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ConstantPool; + return N->getOpcode() == ISD::ConstantPool || + N->getOpcode() == ISD::TargetConstantPool; } }; |