Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.207 -> 1.208 LegalizeDAG.cpp updated: 1.402 -> 1.403 SelectionDAGISel.cpp updated: 1.282 -> 1.283 --- Log message: Make use of getStore(). --- Diffs of the changes: (+36 -52) DAGCombiner.cpp | 12 +++-------- LegalizeDAG.cpp | 54 ++++++++++++++++++++------------------------------- SelectionDAGISel.cpp | 22 +++++++++----------- 3 files changed, 36 insertions(+), 52 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.207 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.208 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.207 Thu Oct 5 10:07:25 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Oct 5 17:57:27 2006 @@ -2738,9 +2738,8 @@ SDNode *PrevStore = Chain.Val; if (PrevStore->getOperand(1) == Value) // Same value multiply stored. return Chain; - SDOperand NewStore = DAG.getNode(ISD::STORE, MVT::Other, - PrevStore->getOperand(0), Value, Ptr, - SrcValue); + SDOperand NewStore = DAG.getStore(PrevStore->getOperand(0), Value, Ptr, + SrcValue); CombineTo(N, NewStore); // Nuke this store. CombineTo(PrevStore, NewStore); // Nuke the previous store. return SDOperand(N, 0); @@ -2750,8 +2749,7 @@ // FIXME: This needs to know that the resultant store does not need a // higher alignment than the original. if (0 && Value.getOpcode() == ISD::BIT_CONVERT) { - return DAG.getNode(ISD::STORE, MVT::Other, Chain, Value.getOperand(0), - Ptr, SrcValue); + return DAG.getStore(Chain, Value.getOperand(0), Ptr, SrcValue); } if (CombinerAA) { @@ -2768,9 +2766,7 @@ // If there is a better chain. if (Chain != BetterChain) { // Replace the chain to avoid dependency. - SDOperand ReplStore = DAG.getNode(ISD::STORE, MVT::Other, - BetterChain, Value, Ptr, - SrcValue); + SDOperand ReplStore = DAG.getStore(BetterChain, Value, Ptr, SrcValue); // Create token to keep both nodes around. return DAG.getNode(ISD::TokenFactor, MVT::Other, Chain, ReplStore); } Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.402 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.403 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.402 Tue Oct 3 19:52:21 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Oct 5 17:57:27 2006 @@ -928,8 +928,8 @@ MVT::ValueType PtrVT = TLI.getPointerTy(); SDOperand StackPtr = CreateStackTemporary(VT); // Store the vector. - SDOperand Ch = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Tmp1, StackPtr, DAG.getSrcValue(NULL)); + SDOperand Ch = DAG.getStore(DAG.getEntryNode(), + Tmp1, StackPtr, DAG.getSrcValue(NULL)); // Truncate or zero extend offset to target pointer type. unsigned CastOpc = (IdxVT > PtrVT) ? ISD::TRUNCATE : ISD::ZERO_EXTEND; @@ -939,8 +939,7 @@ Tmp3 = DAG.getNode(ISD::MUL, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT)); SDOperand StackPtr2 = DAG.getNode(ISD::ADD, IdxVT, Tmp3, StackPtr); // Store the scalar value. - Ch = DAG.getNode(ISD::STORE, MVT::Other, Ch, - Tmp2, StackPtr2, DAG.getSrcValue(NULL)); + Ch = DAG.getStore(Ch, Tmp2, StackPtr2, DAG.getSrcValue(NULL)); // Load the updated vector. Result = DAG.getLoad(VT, Ch, StackPtr, DAG.getSrcValue(NULL)); break; @@ -1615,8 +1614,7 @@ assert(CFP->getValueType(0) == MVT::f64 && "Unknown FP type!"); Tmp3 = DAG.getConstant(DoubleToBits(CFP->getValue()), MVT::i64); } - Result = DAG.getNode(ISD::STORE, MVT::Other, Tmp1, Tmp3, Tmp2, - Node->getOperand(3)); + Result = DAG.getStore(Tmp1, Tmp3, Tmp2, Node->getOperand(3)); break; } @@ -1696,16 +1694,14 @@ std::swap(Lo, Hi); } - Lo = DAG.getNode(ISD::STORE, MVT::Other, Tmp1, Lo, Tmp2, - Node->getOperand(3)); + Lo = DAG.getStore(Tmp1, Lo, Tmp2, Node->getOperand(3)); Tmp2 = DAG.getNode(ISD::ADD, Tmp2.getValueType(), Tmp2, getIntPtrConstant(IncrementSize)); assert(isTypeLegal(Tmp2.getValueType()) && "Pointers must be legal!"); // FIXME: This sets the srcvalue of both halves to be the same, which is // wrong. - Hi = DAG.getNode(ISD::STORE, MVT::Other, Tmp1, Hi, Tmp2, - Node->getOperand(3)); + Hi = DAG.getStore(Tmp1, Hi, Tmp2, Node->getOperand(3)); Result = DAG.getNode(ISD::TokenFactor, MVT::Other, Lo, Hi); break; } @@ -2398,8 +2394,7 @@ DAG.getConstant(MVT::getSizeInBits(VT)/8, TLI.getPointerTy())); // Store the incremented VAList to the legalized pointer - Tmp3 = DAG.getNode(ISD::STORE, MVT::Other, VAList.getValue(1), Tmp3, Tmp2, - Node->getOperand(2)); + Tmp3 = DAG.getStore(VAList.getValue(1), Tmp3, Tmp2, Node->getOperand(2)); // Load the actual argument out of the pointer VAList Result = DAG.getLoad(VT, Tmp3, VAList, DAG.getSrcValue(0)); Tmp1 = LegalizeOp(Result.getValue(1)); @@ -2436,8 +2431,7 @@ // This defaults to loading a pointer from the input and storing it to the // output, returning the chain. Tmp4 = DAG.getLoad(TLI.getPointerTy(), Tmp1, Tmp3, Node->getOperand(3)); - Result = DAG.getNode(ISD::STORE, MVT::Other, Tmp4.getValue(1), Tmp4, Tmp2, - Node->getOperand(4)); + Result = DAG.getStore(Tmp4.getValue(1), Tmp4, Tmp2, Node->getOperand(4)); break; } break; @@ -3225,8 +3219,7 @@ DAG.getConstant(MVT::getSizeInBits(VT)/8, TLI.getPointerTy())); // Store the incremented VAList to the legalized pointer - Tmp3 = DAG.getNode(ISD::STORE, MVT::Other, VAList.getValue(1), Tmp3, Tmp2, - Node->getOperand(2)); + Tmp3 = DAG.getStore(VAList.getValue(1), Tmp3, Tmp2, Node->getOperand(2)); // Load the actual argument out of the pointer VAList Result = DAG.getExtLoad(ISD::EXTLOAD, NVT, Tmp3, VAList, DAG.getSrcValue(0), VT); @@ -3368,8 +3361,8 @@ // If the target doesn't support this, store the value to a temporary // stack slot, then LOAD the scalar element back out. SDOperand StackPtr = CreateStackTemporary(Vector.getValueType()); - SDOperand Ch = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Vector, StackPtr, DAG.getSrcValue(NULL)); + SDOperand Ch = DAG.getStore(DAG.getEntryNode(), + Vector, StackPtr, DAG.getSrcValue(NULL)); // Add the offset to the index. unsigned EltSize = MVT::getSizeInBits(Op.getValueType())/8; @@ -3512,8 +3505,8 @@ SDOperand FIPtr = CreateStackTemporary(DestVT); // Emit a store to the stack slot. - SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - SrcOp, FIPtr, DAG.getSrcValue(NULL)); + SDOperand Store = DAG.getStore(DAG.getEntryNode(), + SrcOp, FIPtr, DAG.getSrcValue(NULL)); // Result is a load from the stack slot. return DAG.getLoad(DestVT, Store, FIPtr, DAG.getSrcValue(0)); } @@ -3522,9 +3515,8 @@ // Create a vector sized/aligned stack slot, store the value to element #0, // then load the whole vector back out. SDOperand StackPtr = CreateStackTemporary(Node->getValueType(0)); - SDOperand Ch = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Node->getOperand(0), StackPtr, - DAG.getSrcValue(NULL)); + SDOperand Ch = DAG.getStore(DAG.getEntryNode(), Node->getOperand(0), StackPtr, + DAG.getSrcValue(NULL)); return DAG.getLoad(Node->getValueType(0), Ch, StackPtr,DAG.getSrcValue(NULL)); } @@ -3673,9 +3665,8 @@ SDOperand Idx = DAG.getConstant(Offset, FIPtr.getValueType()); Idx = DAG.getNode(ISD::ADD, FIPtr.getValueType(), FIPtr, Idx); - Stores.push_back(DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Node->getOperand(i), Idx, - DAG.getSrcValue(NULL))); + Stores.push_back(DAG.getStore(DAG.getEntryNode(), Node->getOperand(i), Idx, + DAG.getSrcValue(NULL))); } SDOperand StoreChain; @@ -4019,13 +4010,12 @@ Op0Mapped = Op0; } // store the lo of the constructed double - based on integer input - SDOperand Store1 = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Op0Mapped, Lo, DAG.getSrcValue(NULL)); + SDOperand Store1 = DAG.getStore(DAG.getEntryNode(), + Op0Mapped, Lo, DAG.getSrcValue(NULL)); // initial hi portion of constructed double SDOperand InitialHi = DAG.getConstant(0x43300000u, MVT::i32); // store the hi of the constructed double - biased exponent - SDOperand Store2 = DAG.getNode(ISD::STORE, MVT::Other, Store1, - InitialHi, Hi, DAG.getSrcValue(NULL)); + SDOperand Store2=DAG.getStore(Store1, InitialHi, Hi, DAG.getSrcValue(NULL)); // load the constructed double SDOperand Load = DAG.getLoad(MVT::f64, Store2, StackSlot, DAG.getSrcValue(NULL)); @@ -4925,8 +4915,8 @@ // Lower to a store/load. FIXME: this could be improved probably. SDOperand Ptr = CreateStackTemporary(Op.getOperand(0).getValueType()); - SDOperand St = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), - Op.getOperand(0), Ptr, DAG.getSrcValue(0)); + SDOperand St = DAG.getStore(DAG.getEntryNode(), + Op.getOperand(0), Ptr, DAG.getSrcValue(0)); MVT::ValueType EVT = cast<VTSDNode>(TypeNode)->getVT(); St = DAG.getVecLoad(NumElements, EVT, St, Ptr, DAG.getSrcValue(0)); SplitVectorOp(St, Lo, Hi); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.282 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.283 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.282 Wed Oct 4 17:23:53 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 5 17:57:27 2006 @@ -1393,8 +1393,8 @@ Value *SrcV = I.getOperand(0); SDOperand Src = getValue(SrcV); SDOperand Ptr = getValue(I.getOperand(1)); - DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr, - DAG.getSrcValue(I.getOperand(1)))); + DAG.setRoot(DAG.getStore(getRoot(), Src, Ptr, + DAG.getSrcValue(I.getOperand(1)))); } /// IntrinsicCannotAccessMemory - Return true if the specified intrinsic cannot @@ -2285,8 +2285,7 @@ // Emit the non-flagged stores from the physregs. SmallVector<SDOperand, 8> OutChains; for (unsigned i = 0, e = StoresToEmit.size(); i != e; ++i) - OutChains.push_back(DAG.getNode(ISD::STORE, MVT::Other, Chain, - StoresToEmit[i].first, + OutChains.push_back(DAG.getStore(Chain, StoresToEmit[i].first, getValue(StoresToEmit[i].second), DAG.getSrcValue(StoresToEmit[i].second))); if (!OutChains.empty()) @@ -2863,8 +2862,7 @@ MVT::ValueType VT = MemOps[i]; unsigned VTSize = getSizeInBits(VT) / 8; SDOperand Value = getMemsetValue(Op2, VT, DAG); - SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, getRoot(), - Value, + SDOperand Store = DAG.getStore(getRoot(), Value, getMemBasePlusOffset(Op1, Offset, DAG, TLI), DAG.getSrcValue(I.getOperand(1), Offset)); OutChains.push_back(Store); @@ -2910,18 +2908,18 @@ Value = getMemsetStringVal(VT, DAG, TLI, Str, SrcOff); Chain = getRoot(); Store = - DAG.getNode(ISD::STORE, MVT::Other, Chain, Value, - getMemBasePlusOffset(Op1, DstOff, DAG, TLI), - DAG.getSrcValue(I.getOperand(1), DstOff)); + DAG.getStore(Chain, Value, + getMemBasePlusOffset(Op1, DstOff, DAG, TLI), + DAG.getSrcValue(I.getOperand(1), DstOff)); } else { Value = DAG.getLoad(VT, getRoot(), getMemBasePlusOffset(Op2, SrcOff, DAG, TLI), DAG.getSrcValue(I.getOperand(2), SrcOff)); Chain = Value.getValue(1); Store = - DAG.getNode(ISD::STORE, MVT::Other, Chain, Value, - getMemBasePlusOffset(Op1, DstOff, DAG, TLI), - DAG.getSrcValue(I.getOperand(1), DstOff)); + DAG.getStore(Chain, Value, + getMemBasePlusOffset(Op1, DstOff, DAG, TLI), + DAG.getSrcValue(I.getOperand(1), DstOff)); } OutChains.push_back(Store); SrcOff += VTSize; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits