summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-25 00:43:01 +0000
committerChris Lattner <sabre@nondot.org>2005-08-25 00:43:01 +0000
commitbbe0e7df2cf487900a0ff6b90a4e7011deaef0f0 (patch)
tree9ff71c9c29498c909cd443b089d2898e0981561c /llvm/lib/CodeGen
parent66a6a132254e330d6976b37e365ee5294c16ea09 (diff)
downloadbcm5719-llvm-bbe0e7df2cf487900a0ff6b90a4e7011deaef0f0.tar.gz
bcm5719-llvm-bbe0e7df2cf487900a0ff6b90a4e7011deaef0f0.zip
add a new TargetFrameIndex node
llvm-svn: 23035
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 97c28521c7b..68ef11e8bf9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud