Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.342 -> 1.343 --- Log message: Add getStore() helper function to create ISD::STORE nodes. --- Diffs of the changes: (+16 -1) SelectionDAG.cpp | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.342 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.343 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.342 Tue Oct 3 19:52:21 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Oct 5 17:57:11 2006 @@ -1490,6 +1490,21 @@ return getNode(ISD::LOADX, getVTList(VT, MVT::Other), Ops, 5); } +SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Value, + SDOperand Ptr, SDOperand SV) { + SDVTList VTs = getVTList(MVT::Other); + SDOperand Ops[] = { Chain, Value, Ptr, SV }; + SelectionDAGCSEMap::NodeID ID(ISD::STORE, VTs, Ops, 4); + void *IP = 0; + if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) + return SDOperand(E, 0); + SDNode *N = new SDNode(ISD::STORE, Chain, Value, Ptr, SV); + N->setValueTypes(VTs); + CSEMap.InsertNode(N, IP); + AllNodes.push_back(N); + return SDOperand(N, 0); +} + SDOperand SelectionDAG::getVAArg(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr, SDOperand SV) { @@ -1523,7 +1538,7 @@ // Also for ConstantFP? #endif if (Ops[0].getValueType() == EVT) // Normal store? - return getNode(ISD::STORE, VT, Ops[0], Ops[1], Ops[2], Ops[3]); + return getStore(Ops[0], Ops[1], Ops[2], Ops[3]); assert(Ops[1].getValueType() > EVT && "Not a truncation?"); assert(MVT::isInteger(Ops[1].getValueType()) == MVT::isInteger(EVT) && "Can't do FP-INT conversion!"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits