summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-02-25 09:54:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-02-25 09:54:52 +0000
commited169db8a55114fce67e98df0164a77a5e671d0e (patch)
treea7e542513024f8aa712261419317637d1b24c2f7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentb8d9667087a16e90de33188a2b153f0beebbd066 (diff)
downloadbcm5719-llvm-ed169db8a55114fce67e98df0164a77a5e671d0e.tar.gz
bcm5719-llvm-ed169db8a55114fce67e98df0164a77a5e671d0e.zip
Added an offset field to ConstantPoolSDNode.
llvm-svn: 26371
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 59449625e66..8b930948d2a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -302,12 +302,14 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) {
case ISD::ConstantPool:
Erased = ConstantPoolIndices.
erase(std::make_pair(cast<ConstantPoolSDNode>(N)->get(),
- cast<ConstantPoolSDNode>(N)->getAlignment()));
+ std::make_pair(cast<ConstantPoolSDNode>(N)->getOffset(),
+ cast<ConstantPoolSDNode>(N)->getAlignment())));
break;
case ISD::TargetConstantPool:
Erased = TargetConstantPoolIndices.
erase(std::make_pair(cast<ConstantPoolSDNode>(N)->get(),
- cast<ConstantPoolSDNode>(N)->getAlignment()));
+ std::make_pair(cast<ConstantPoolSDNode>(N)->getOffset(),
+ cast<ConstantPoolSDNode>(N)->getAlignment())));
break;
case ISD::BasicBlock:
Erased = BBNodes.erase(cast<BasicBlockSDNode>(N)->getBasicBlock());
@@ -650,19 +652,21 @@ SDOperand SelectionDAG::getTargetFrameIndex(int FI, MVT::ValueType VT) {
}
SDOperand SelectionDAG::getConstantPool(Constant *C, MVT::ValueType VT,
- unsigned Alignment) {
- SDNode *&N = ConstantPoolIndices[std::make_pair(C, Alignment)];
+ unsigned Alignment, int Offset) {
+ SDNode *&N = ConstantPoolIndices[std::make_pair(C,
+ std::make_pair(Offset, Alignment))];
if (N) return SDOperand(N, 0);
- N = new ConstantPoolSDNode(C, VT, Alignment, false);
+ N = new ConstantPoolSDNode(false, C, VT, Offset, Alignment);
AllNodes.push_back(N);
return SDOperand(N, 0);
}
SDOperand SelectionDAG::getTargetConstantPool(Constant *C, MVT::ValueType VT,
- unsigned Alignment) {
- SDNode *&N = TargetConstantPoolIndices[std::make_pair(C, Alignment)];
+ unsigned Alignment, int Offset) {
+ SDNode *&N = TargetConstantPoolIndices[std::make_pair(C,
+ std::make_pair(Offset, Alignment))];
if (N) return SDOperand(N, 0);
- N = new ConstantPoolSDNode(C, VT, Alignment, true);
+ N = new ConstantPoolSDNode(true, C, VT, Offset, Alignment);
AllNodes.push_back(N);
return SDOperand(N, 0);
}
OpenPOWER on IntegriCloud