Lines Matching full:slices

584 /// Representation of the alloca slices.
586 /// This class represents the slices of an alloca which are formed by its
588 /// for the slices used and we reflect that in this structure. The uses are
589 /// stored, sorted by increasing beginning offset and with unsplittable slices
590 /// starting at a particular offset before splittable slices.
593 /// Construct the slices of a particular alloca.
598 /// If this is true, the slices are never fully built and should be
602 /// Support for iterating over the slices.
607 iterator begin() { return Slices.begin(); } in begin()
608 iterator end() { return Slices.end(); } in end()
613 const_iterator begin() const { return Slices.begin(); } in begin()
614 const_iterator end() const { return Slices.end(); } in end()
617 /// Erase a range of slices.
618 void erase(iterator Start, iterator Stop) { Slices.erase(Start, Stop); } in erase()
620 /// Insert new slices for this alloca.
622 /// This moves the slices into the alloca's slices collection, and re-sorts
623 /// everything so that the usual ordering properties of the alloca's slices
626 int OldSize = Slices.size(); in insert()
627 Slices.append(NewSlices.begin(), NewSlices.end()); in insert()
628 auto SliceI = Slices.begin() + OldSize; in insert()
629 std::stable_sort(SliceI, Slices.end()); in insert()
630 std::inplace_merge(Slices.begin(), SliceI, Slices.end()); in insert()
677 /// of slices.
680 /// store a pointer to that here and abort trying to form slices of the
681 /// alloca. This will be null if the alloca slices are analyzed successfully.
684 /// The slices of the alloca.
686 /// We store a vector of the slices formed by uses of the alloca here. This
688 /// slices before the splittable ones. See the Slice inner class for more
690 SmallVector<Slice, 8> Slices; member in __anondf5662880411::AllocaSlices
714 /// A partition of the slices.
716 /// An ephemeral representation for a range of slices which can be viewed as
718 /// memory which cannot be split, and provides access to all of the slices
721 /// Objects of this type are produced by traversing the alloca's slices, but
747 /// All of the contained slices start at or after this offset.
752 /// All of the contained slices end at or before this offset.
763 /// Test whether this partition contains no slices, and merely spans
764 /// a region occupied by split slices.
767 /// \name Iterate slices that start within the partition.
782 /// These tails are of slices which start before this partition but are
790 /// An iterator over partitions of the alloca's slices.
793 /// slices. It is a forward iterator as we don't support backtracking for
795 /// current set of split slices.
808 /// We need to keep the end of the slices to know when to stop.
827 /// Requires that the iterator not be at the end of the slices.
830 "Cannot advance past the end of the slices!"); in advance()
860 assert(P.SplitTails.empty() && "Failed to clear the split slices!"); in advance()
867 // Accumulate all the splittable slices which started in the old in advance()
879 // If P.SI is now at the end, we at most have a tail of split slices. in advance()
886 // If the we have split slices and the next slice is after a gap and is in advance()
888 // slices up until the next slice begins. in advance()
897 // OK, we need to consume new slices. Set the end offset based on the in advance()
900 // pre-existing split slices that are continuing, in which case we begin in advance()
913 // Form a partition including all of the overlapping slices with this in advance()
931 // Collect all of the overlapping splittable slices. in advance()
940 // a partition spanning only splittable slices. in advance()
953 // the emptiness of the split slices. The latter is only relevant when in operator ==()
955 // slices list, but the prior may have the same P.SI and a tail of split in operator ==()
956 // slices. in operator ==()
959 "Same set of slices formed two different sized partitions!"); in operator ==()
976 /// A forward range over the partitions of the alloca's slices.
979 /// slices. It computes these partitions on the fly based on the overlapping
980 /// offsets of the slices and the ability to split them. It will visit "empty"
982 /// slices.
1009 /// Builder for the alloca slices.
1011 /// This class builds a set of alloca slices by recursively visiting the uses
1073 AS.Slices.push_back(Slice(BeginOffset, EndOffset, U, IsSplittable)); in insertUse()
1197 AS.Slices[MTPI->second].kill(); in visitMemTransferInst()
1219 MemTransferSliceMap.insert(std::make_pair(&II, AS.Slices.size())); in visitMemTransferInst()
1222 Slice &PrevP = AS.Slices[PrevIdx]; in visitMemTransferInst()
1240 assert(AS.Slices[PrevIdx].getUse()->getUser() == &II && in visitMemTransferInst()
1412 llvm::erase_if(Slices, [](const Slice &S) { return S.isDead(); }); in AllocaSlices()
1416 llvm::stable_sort(Slices); in AllocaSlices()
1442 OS << "Can't analyze slices for alloca: " << AI << "\n" in print()
1448 OS << "Slices of alloca: " << AI << "\n"; in print()
1461 /// sequence of slices.
1470 // always get consistent results regardless of the order of slices. in findCommonType()
1500 // To avoid depending on the order of slices, Ty and TyIsCommon must not in findCommonType()
2094 /// (and thus isVectorPromotionViable) over all slices of the alloca for the
2123 /// all slices of the alloca for the given VectorType.
2246 /// Test whether the given alloca partitioning and range of slices can be
2349 // larger than other load/store slices (RelEnd > Size). But lifetime are in isIntegerWideningViableForSlice()
2350 // always promotable and should not impact other slices' promotability of the in isIntegerWideningViableForSlice()
2453 // FIXME: We shouldn't consider split slices that happen to start in the in isIntegerWideningViable()
2755 // interchangeably for unsplit slices. in getNewAllocaSlicePtr()
4318 // all the slices that end up split. in presplitLoadsAndStores()
4401 // Now scan the already split slices, and add a split for any of them which in presplitLoadsAndStores()
4485 // Collect the new slices which we will merge into the alloca slices. in presplitLoadsAndStores()
4498 // load in a parallel structure. We also build the slices for them and append in presplitLoadsAndStores()
4499 // them to the alloca slices. in presplitLoadsAndStores()
4757 // Remove the killed slices that have ben pre-split. in presplitLoadsAndStores()
4760 // Insert our new slices. This will sort and merge them into the sorted in presplitLoadsAndStores()
4764 LLVM_DEBUG(dbgs() << " Pre-split slices:\n"); in presplitLoadsAndStores()
4900 // Now that we've processed all the slices in the new partition, check if any in rewritePartition()
5203 /// Walks the slices of an alloca and form partitions based on them,
5218 // We leave a slice splittable if all other slices are disjoint or fully in splitAlloca()
5426 /// the slices of the alloca, and then hands it off to be split and
5457 // Build the slices using a recursive instruction-visiting builder. in runOnAlloca()
5481 // No slices to split. Leave the dead alloca for a later pass to clean up. in runOnAlloca()