Lines Matching full:stores
48 STATISTIC(NumStoresMerged, "Number of stores merged");
306 // Try to merge all the stores in the vector, splitting into separate segments in mergeStores()
308 assert(StoresToMerge.size() > 1 && "Expected multiple stores to merge"); in mergeStores()
326 // Compute the biggest store we can generate to handle the number of stores. in mergeStores()
360 bool LoadStoreOpt::doSingleStoreMerge(SmallVectorImpl<GStore *> &Stores) { in doSingleStoreMerge() argument
361 assert(Stores.size() > 1); in doSingleStoreMerge()
362 // We know that all the stores are consecutive and there are no aliasing in doSingleStoreMerge()
367 GStore *FirstStore = Stores[0]; in doSingleStoreMerge()
368 const unsigned NumStores = Stores.size(); in doSingleStoreMerge()
374 DebugLoc MergedLoc = Stores.front()->getDebugLoc(); in doSingleStoreMerge()
375 for (auto *Store : drop_begin(Stores)) in doSingleStoreMerge()
378 Builder.setInstr(*Stores.back()); in doSingleStoreMerge()
385 for (auto *Store : Stores) { in doSingleStoreMerge()
419 LLVM_DEBUG(dbgs() << "Merged " << Stores.size() in doSingleStoreMerge()
420 << " stores into merged store: " << *NewStore); in doSingleStoreMerge()
421 LLVM_DEBUG(for (auto *MI : Stores) dbgs() << " " << *MI;); in doSingleStoreMerge()
422 NumStoresMerged += Stores.size(); in doSingleStoreMerge()
429 R << "Merged " << NV("NumMerged", Stores.size()) << " stores of " in doSingleStoreMerge()
436 for (auto *MI : Stores) in doSingleStoreMerge()
442 if (C.Stores.size() < 2) { in processMergeCandidate()
447 LLVM_DEBUG(dbgs() << "Checking store merge candidate with " << C.Stores.size() in processMergeCandidate()
448 << " stores, starting with " << *C.Stores[0]); in processMergeCandidate()
449 // We know that the stores in the candidate are adjacent. in processMergeCandidate()
451 // during the search alias with load/stores added to the candidate after. in processMergeCandidate()
453 // C.Stores = [ST1, ST2, ST3, ST4] in processMergeCandidate()
484 for (int StoreIdx = C.Stores.size() - 1; StoreIdx >= 0; --StoreIdx) { in processMergeCandidate()
485 auto *CheckStore = C.Stores[StoreIdx]; in processMergeCandidate()
492 << " stores remaining after alias checks. Merging...\n"); in processMergeCandidate()
494 // Now we've checked for aliasing hazards, merge any stores left. in processMergeCandidate()
503 if (C.Stores.empty()) in operationAliasesWithCandidate()
505 return llvm::any_of(C.Stores, [&](MachineInstr *OtherMI) { in operationAliasesWithCandidate()
511 PotentialAliases.emplace_back(std::make_pair(&MI, Stores.size() - 1)); in addPotentialAlias()
525 // Don't allow truncating stores for now. in addStoreToCandidate()
529 // Avoid adding volatile or ordered stores to the candidate. We already have a in addStoreToCandidate()
538 if (C.Stores.empty()) { in addStoreToCandidate()
551 C.Stores.emplace_back(&StoreMI); in addStoreToCandidate()
558 if (MRI->getType(C.Stores[0]->getValueReg()).getSizeInBits() != in addStoreToCandidate()
562 if (MRI->getType(C.Stores[0]->getPointerReg()).getAddressSpace() != in addStoreToCandidate()
566 // There are other stores in the candidate. Check that the store address in addStoreToCandidate()
579 C.Stores.emplace_back(&StoreMI); in addStoreToCandidate()
608 // If we don't have any stores yet, this instruction can't pose a problem. in mergeBlockStores()
609 if (Candidate.Stores.empty()) in mergeBlockStores()
615 Candidate.Stores.clear(); in mergeBlockStores()
629 // Record this instruction as a potential alias for future stores that are in mergeBlockStores()
692 /// stores. Fold it into a single store or a BSWAP and a store if the targets
717 // We only handle merging simple stores of 1-4 bytes. in mergeTruncStore()
731 // We do a simple search for mergeable stores prior to this one. in mergeTruncStore()
743 // The single base pointer that all stores must use. in mergeTruncStore()
824 // We didn't find enough stores to merge into the size of the original in mergeTruncStore()
842 // to merge the stores. in mergeTruncStore()
899 // Erase the old stores. in mergeTruncStore()
909 SmallVector<GStore *, 16> Stores; in mergeTruncStoresBlock() local
911 // Walk up the block so we can see the most eligible stores. in mergeTruncStoresBlock()
914 Stores.emplace_back(StoreMI); in mergeTruncStoresBlock()
916 for (auto *StoreMI : Stores) { in mergeTruncStoresBlock()
947 // We record this because we don't want to bother trying to merge stores into in initializeStoreMergeTargetInfo()
961 // We assume that we're not going to be generating any stores wider than in initializeStoreMergeTargetInfo()