diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-02-25 09:54:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-02-25 09:54:52 +0000 |
commit | 404cb4f9fa2df50eac4d84b8a77c84a92188c6d5 (patch) | |
tree | baf5af33b59652d826500e5b0a678856c5ed5d68 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 05b53740e21ca0ce342f13b05c238134030420fb (diff) |
Added an offset field to ConstantPoolSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 59449625e6..8b930948d2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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); } |