Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.70 -> 1.71 SelectionDAG.cpp updated: 1.259 -> 1.260 --- Log message: Added an offset field to ConstantPoolSDNode. --- Diffs of the changes: (+14 -9) ScheduleDAG.cpp | 3 ++- SelectionDAG.cpp | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.70 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.71 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.70 Fri Feb 24 13:50:58 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Sat Feb 25 03:53:49 2006 @@ -154,6 +154,7 @@ MI->addFrameIndexOperand(FI->getIndex()); } else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Op)) { + int Offset = CP->getOffset(); unsigned Align = CP->getAlignment(); // MachineConstantPool wants an explicit alignment. if (Align == 0) { @@ -165,7 +166,7 @@ } unsigned Idx = ConstPool->getConstantPoolIndex(CP->get(), Align); - MI->addConstantPoolIndexOperand(Idx); + MI->addConstantPoolIndexOperand(Idx, Offset); } else if (ExternalSymbolSDNode *ES = dyn_cast<ExternalSymbolSDNode>(Op)) { MI->addExternalSymbolOperand(ES->getSymbol(), false); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.259 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.260 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.259 Fri Feb 17 20:40:58 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Feb 25 03:53:49 2006 @@ -302,12 +302,14 @@ 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::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); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits