Lines Matching refs:StoreNodes

766     SDValue getMergeStoreChains(SmallVectorImpl<MemOpLink> &StoreNodes,
772 bool hasSameUnderlyingObj(ArrayRef<MemOpLink> StoreNodes);
778 bool mergeStoresOfConstantsOrVecElts(SmallVectorImpl<MemOpLink> &StoreNodes,
787 SmallVectorImpl<MemOpLink> &StoreNodes);
794 SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumStores,
800 unsigned getConsecutiveStores(SmallVectorImpl<MemOpLink> &StoreNodes,
805 bool tryStoreMergeOfConstants(SmallVectorImpl<MemOpLink> &StoreNodes,
813 bool tryStoreMergeOfExtracts(SmallVectorImpl<MemOpLink> &StoreNodes,
819 bool tryStoreMergeOfLoads(SmallVectorImpl<MemOpLink> &StoreNodes,
20142 SDValue DAGCombiner::getMergeStoreChains(SmallVectorImpl<MemOpLink> &StoreNodes, in getMergeStoreChains() argument
20146 SDLoc StoreDL(StoreNodes[0].MemNode); in getMergeStoreChains()
20149 Visited.insert(StoreNodes[i].MemNode); in getMergeStoreChains()
20154 if (Visited.insert(StoreNodes[i].MemNode->getChain().getNode()).second) in getMergeStoreChains()
20155 Chains.push_back(StoreNodes[i].MemNode->getChain()); in getMergeStoreChains()
20162 bool DAGCombiner::hasSameUnderlyingObj(ArrayRef<MemOpLink> StoreNodes) { in hasSameUnderlyingObj() argument
20164 for (const auto &MemOp : StoreNodes) { in hasSameUnderlyingObj()
20187 SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT, unsigned NumStores, in mergeStoresOfConstantsOrVecElts() argument
20197 SDLoc DL(StoreNodes[0].MemNode); in mergeStoresOfConstantsOrVecElts()
20206 StoreSDNode *St = cast<StoreSDNode>(StoreNodes[I].MemNode); in mergeStoresOfConstantsOrVecElts()
20232 StoreSDNode *St = cast<StoreSDNode>(StoreNodes[I].MemNode); in mergeStoresOfConstantsOrVecElts()
20264 StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode); in mergeStoresOfConstantsOrVecElts()
20310 StoreSDNode *St = cast<StoreSDNode>(StoreNodes[Idx].MemNode); in mergeStoresOfConstantsOrVecElts()
20340 LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode; in mergeStoresOfConstantsOrVecElts()
20341 SDValue NewChain = getMergeStoreChains(StoreNodes, NumStores); in mergeStoresOfConstantsOrVecElts()
20342 bool CanReusePtrInfo = hasSameUnderlyingObj(StoreNodes); in mergeStoresOfConstantsOrVecElts()
20376 CombineTo(StoreNodes[i].MemNode, NewStore); in mergeStoresOfConstantsOrVecElts()
20384 SmallVectorImpl<MemOpLink> &StoreNodes) { in getStoreMergeCandidates() argument
20521 StoreNodes.push_back(MemOpLink(OtherStore, PtrDiff)); in getStoreMergeCandidates()
20556 SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumStores, in checkMergeStoreCandidatesForDependencies() argument
20585 SDNode *N = StoreNodes[i].MemNode; in checkMergeStoreCandidatesForDependencies()
20607 if (SDNode::hasPredecessorHelper(StoreNodes[i].MemNode, Visited, Worklist, in checkMergeStoreCandidatesForDependencies()
20613 auto &RootCount = StoreRootCountMap[StoreNodes[i].MemNode]; in checkMergeStoreCandidatesForDependencies()
20625 DAGCombiner::getConsecutiveStores(SmallVectorImpl<MemOpLink> &StoreNodes, in getConsecutiveStores() argument
20630 while ((StartIdx + 1 < StoreNodes.size()) && in getConsecutiveStores()
20631 StoreNodes[StartIdx].OffsetFromBase + ElementSizeBytes != in getConsecutiveStores()
20632 StoreNodes[StartIdx + 1].OffsetFromBase) in getConsecutiveStores()
20636 if (StartIdx + 1 >= StoreNodes.size()) in getConsecutiveStores()
20641 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + StartIdx); in getConsecutiveStores()
20646 int64_t StartAddress = StoreNodes[0].OffsetFromBase; in getConsecutiveStores()
20649 for (unsigned i = 1, e = StoreNodes.size(); i < e; ++i) { in getConsecutiveStores()
20650 int64_t CurrAddress = StoreNodes[i].OffsetFromBase; in getConsecutiveStores()
20660 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + 1); in getConsecutiveStores()
20665 SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores, in tryStoreMergeOfConstants() argument
20675 LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode; in tryStoreMergeOfConstants()
20684 StoreSDNode *ST = cast<StoreSDNode>(StoreNodes[i].MemNode); in tryStoreMergeOfConstants()
20765 (StoreNodes[NumSkip].MemNode->getAlign() <= FirstStoreAlign)) in tryStoreMergeOfConstants()
20768 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip); in tryStoreMergeOfConstants()
20774 if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem, in tryStoreMergeOfConstants()
20776 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem); in tryStoreMergeOfConstants()
20781 MadeChange |= mergeStoresOfConstantsOrVecElts(StoreNodes, MemVT, NumElem, in tryStoreMergeOfConstants()
20786 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem); in tryStoreMergeOfConstants()
20793 SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores, in tryStoreMergeOfExtracts() argument
20802 LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode; in tryStoreMergeOfExtracts()
20835 (StoreNodes[NumSkip].MemNode->getAlign() <= FirstStoreAlign)) in tryStoreMergeOfExtracts()
20838 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip); in tryStoreMergeOfExtracts()
20844 if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumStoresToMerge, in tryStoreMergeOfExtracts()
20846 StoreNodes.erase(StoreNodes.begin(), in tryStoreMergeOfExtracts()
20847 StoreNodes.begin() + NumStoresToMerge); in tryStoreMergeOfExtracts()
20853 StoreNodes, MemVT, NumStoresToMerge, /*IsConstantSrc*/ false, in tryStoreMergeOfExtracts()
20856 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumStoresToMerge); in tryStoreMergeOfExtracts()
20862 bool DAGCombiner::tryStoreMergeOfLoads(SmallVectorImpl<MemOpLink> &StoreNodes, in tryStoreMergeOfLoads() argument
20881 StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode); in tryStoreMergeOfLoads()
20908 StoreNodes[0].MemNode->getAlign() >= RequiredAlignment) { in tryStoreMergeOfLoads()
20909 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + 2); in tryStoreMergeOfLoads()
20924 LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode; in tryStoreMergeOfLoads()
21041 (StoreNodes[NumSkip].MemNode->getAlign() <= FirstStoreAlign)) in tryStoreMergeOfLoads()
21043 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip); in tryStoreMergeOfLoads()
21050 if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem, in tryStoreMergeOfLoads()
21052 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem); in tryStoreMergeOfLoads()
21071 SDLoc StoreDL(StoreNodes[0].MemNode); in tryStoreMergeOfLoads()
21076 SDValue NewStoreChain = getMergeStoreChains(StoreNodes, NumElem); in tryStoreMergeOfLoads()
21077 bool CanReusePtrInfo = hasSameUnderlyingObj(StoreNodes); in tryStoreMergeOfLoads()
21092 StMMOFlags |= TLI.getTargetMMOFlags(*StoreNodes[0].MemNode); in tryStoreMergeOfLoads()
21139 SDValue Val = StoreNodes[i].MemNode->getOperand(1); in tryStoreMergeOfLoads()
21140 CombineTo(StoreNodes[i].MemNode, NewStore); in tryStoreMergeOfLoads()
21146 StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem); in tryStoreMergeOfLoads()
21179 SmallVector<MemOpLink, 8> StoreNodes; in mergeConsecutiveStores() local
21181 SDNode *RootNode = getStoreMergeCandidates(St, StoreNodes); in mergeConsecutiveStores()
21184 if (StoreNodes.size() < 2) in mergeConsecutiveStores()
21189 llvm::sort(StoreNodes, [](MemOpLink LHS, MemOpLink RHS) { in mergeConsecutiveStores()
21207 while (StoreNodes.size() > 1) { in mergeConsecutiveStores()
21209 getConsecutiveStores(StoreNodes, ElementSizeBytes); in mergeConsecutiveStores()
21218 MadeChange |= tryStoreMergeOfConstants(StoreNodes, NumConsecutiveStores, in mergeConsecutiveStores()
21223 MadeChange |= tryStoreMergeOfExtracts(StoreNodes, NumConsecutiveStores, in mergeConsecutiveStores()
21228 MadeChange |= tryStoreMergeOfLoads(StoreNodes, NumConsecutiveStores, in mergeConsecutiveStores()