diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-19 22:31:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-19 22:31:34 +0000 |
commit | f6b184981e429ff03742d66cf7111debd9e2bc61 (patch) | |
tree | 5be022b090bf21b9bbda52a7cec1265b0891b0e9 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | aaaa0b67dd0a943ee9275c42d7df4bd244d52c95 (diff) |
ADd support for TargetGlobalAddress nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index b365d9d2d6..56a279c77b 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -60,6 +60,11 @@ namespace ISD { // TargetConstant - Like Constant, but the DAG does not do any folding or // simplification of the constant. This is used by the DAG->DAG selector. TargetConstant, + + // TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or + // anything else with this node, and this is valid in the target-specific + // dag, turning into a GlobalAddress operand. + TargetGlobalAddress, // CopyToReg - This node has three operands: a chain, a register number to // set to this value, and a value. @@ -775,8 +780,8 @@ class GlobalAddressSDNode : public SDNode { GlobalValue *TheGlobal; protected: friend class SelectionDAG; - GlobalAddressSDNode(const GlobalValue *GA, MVT::ValueType VT) - : SDNode(ISD::GlobalAddress, VT) { + GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT) + : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, VT) { TheGlobal = const_cast<GlobalValue*>(GA); } public: @@ -785,7 +790,8 @@ public: static bool classof(const GlobalAddressSDNode *) { return true; } static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::GlobalAddress; + return N->getOpcode() == ISD::GlobalAddress || + N->getOpcode() == ISD::TargetGlobalAddress; } }; |