diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-25 00:43:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-25 00:43:01 +0000 |
commit | afb2dd43de61f4585e75d1f3ab93a9ac4b3b7592 (patch) | |
tree | 064e9d091f041dc9c64db89dc4d13ed0e1e5b24a /include | |
parent | 89532c7db03543402dd5376172b87233575beb44 (diff) | |
download | external_llvm-afb2dd43de61f4585e75d1f3ab93a9ac4b3b7592.zip external_llvm-afb2dd43de61f4585e75d1f3ab93a9ac4b3b7592.tar.gz external_llvm-afb2dd43de61f4585e75d1f3ab93a9ac4b3b7592.tar.bz2 |
add a new TargetFrameIndex node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 3204968..02af6d3 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -99,6 +99,7 @@ public: SDOperand getGlobalAddress(const GlobalValue *GV, MVT::ValueType VT); SDOperand getTargetGlobalAddress(const GlobalValue *GV, MVT::ValueType VT); SDOperand getFrameIndex(int FI, MVT::ValueType VT); + SDOperand getTargetFrameIndex(int FI, MVT::ValueType VT); SDOperand getConstantPool(unsigned CPIdx, MVT::ValueType VT); SDOperand getBasicBlock(MachineBasicBlock *MBB); SDOperand getExternalSymbol(const char *Sym, MVT::ValueType VT); @@ -307,7 +308,7 @@ private: std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> Constants; std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> TargetConstants; std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> ConstantFPs; - std::map<int, SDNode*> FrameIndices; + std::map<int, SDNode*> FrameIndices, TargetFrameIndices; std::map<unsigned, SDNode*> ConstantPoolIndices; std::map<MachineBasicBlock *, SDNode*> BBNodes; std::vector<SDNode*> ValueTypeNodes; diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 5681a36..319403c 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -65,6 +65,7 @@ namespace ISD { // anything else with this node, and this is valid in the target-specific // dag, turning into a GlobalAddress operand. TargetGlobalAddress, + TargetFrameIndex, // CopyToReg - This node has three operands: a chain, a register number to // set to this value, and a value. @@ -812,15 +813,16 @@ class FrameIndexSDNode : public SDNode { int FI; protected: friend class SelectionDAG; - FrameIndexSDNode(int fi, MVT::ValueType VT) - : SDNode(ISD::FrameIndex, VT), FI(fi) {} + FrameIndexSDNode(int fi, MVT::ValueType VT, bool isTarg) + : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, VT), FI(fi) {} public: int getIndex() const { return FI; } static bool classof(const FrameIndexSDNode *) { return true; } static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::FrameIndex; + return N->getOpcode() == ISD::FrameIndex || + N->getOpcode() == ISD::TargetFrameIndex; } }; |