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 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 89532c7db03543402dd5376172b87233575beb44 (diff) |
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 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 97c28521c7..68ef11e8bf 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -261,6 +261,9 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) { case ISD::FrameIndex: FrameIndices.erase(cast<FrameIndexSDNode>(N)->getIndex()); break; + case ISD::TargetFrameIndex: + TargetFrameIndices.erase(cast<FrameIndexSDNode>(N)->getIndex()); + break; case ISD::ConstantPool: ConstantPoolIndices.erase(cast<ConstantPoolSDNode>(N)->getIndex()); break; @@ -433,7 +436,15 @@ SDOperand SelectionDAG::getTargetGlobalAddress(const GlobalValue *GV, SDOperand SelectionDAG::getFrameIndex(int FI, MVT::ValueType VT) { SDNode *&N = FrameIndices[FI]; if (N) return SDOperand(N, 0); - N = new FrameIndexSDNode(FI, VT); + N = new FrameIndexSDNode(FI, VT, false); + AllNodes.push_back(N); + return SDOperand(N, 0); +} + +SDOperand SelectionDAG::getTargetFrameIndex(int FI, MVT::ValueType VT) { + SDNode *&N = TargetFrameIndices[FI]; + if (N) return SDOperand(N, 0); + N = new FrameIndexSDNode(FI, VT, true); AllNodes.push_back(N); return SDOperand(N, 0); } @@ -2071,6 +2082,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::GlobalAddress: return "GlobalAddress"; case ISD::TargetGlobalAddress: return "TargetGlobalAddress"; case ISD::FrameIndex: return "FrameIndex"; + case ISD::TargetFrameIndex: return "TargetFrameIndex"; case ISD::BasicBlock: return "BasicBlock"; case ISD::Register: return "Register"; case ISD::ExternalSymbol: return "ExternalSymbol"; |