Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Slices

79 /// Hidden option to enable randomly shuffling the slices to help uncover
81 static cl::opt<bool> SROARandomShuffleSlices("sroa-random-shuffle-slices",
189 /// \brief Representation of the alloca slices.
191 /// This class represents the slices of an alloca which are formed by its
193 /// for the slices used and we reflect that in this structure. The uses are
194 /// stored, sorted by increasing beginning offset and with unsplittable slices
195 /// starting at a particular offset before splittable slices.
198 /// \brief Construct the slices of a particular alloca.
203 /// If this is true, the slices are never fully built and should be
207 /// \brief Support for iterating over the slices.
211 iterator begin() { return Slices.begin(); }
212 iterator end() { return Slices.end(); }
216 const_iterator begin() const { return Slices.begin(); }
217 const_iterator end() const { return Slices.end(); }
220 /// \brief Erase a range of slices.
221 void erase(iterator Start, iterator Stop) { Slices.erase(Start, Stop); }
223 /// \brief Insert new slices for this alloca.
225 /// This moves the slices into the alloca's slices collection, and re-sorts
226 /// everything so that the usual ordering properties of the alloca's slices
229 int OldSize = Slices.size();
230 Slices.append(NewSlices.begin(), NewSlices.end());
231 auto SliceI = Slices.begin() + OldSize;
232 std::sort(SliceI, Slices.end());
233 std::inplace_merge(Slices.begin(), SliceI, Slices.end());
274 /// of slices.
277 /// store a pointer to that here and abort trying to form slices of the
278 /// alloca. This will be null if the alloca slices are analyzed successfully.
281 /// \brief The slices of the alloca.
283 /// We store a vector of the slices formed by uses of the alloca here. This
285 /// slices before the splittable ones. See the Slice inner class for more
287 SmallVector<Slice, 8> Slices;
308 /// \brief A partition of the slices.
310 /// An ephemeral representation for a range of slices which can be viewed as
312 /// memory which cannot be split, and provides access to all of the slices
315 /// Objects of this type are produced by traversing the alloca's slices, but
341 /// All of the contained slices start at or after this offset.
346 /// All of the contained slices end at or before this offset.
357 /// \brief Test whether this partition contains no slices, and merely spans
358 /// a region occupied by split slices.
361 /// \name Iterate slices that start within the partition.
376 /// These tails are of slices which start before this partition but are
382 /// \brief An iterator over partitions of the alloca's slices.
385 /// slices. It is a forward iterator as we don't support backtracking for
387 /// current set of split slices.
400 /// \brief We need to keep the end of the slices to know when to stop.
419 /// Requires that the iterator not be at the end of the slices.
422 "Cannot advance past the end of the slices!");
455 assert(P.SplitTails.empty() && "Failed to clear the split slices!");
462 // Accumulate all the splittable slices which started in the old
474 // If P.SI is now at the end, we at most have a tail of split slices.
481 // If the we have split slices and the next slice is after a gap and is
483 // slices up until the next slice begins.
492 // OK, we need to consume new slices. Set the end offset based on the
495 // pre-existing split slices that are continuing, in which case we begin
508 // Form a partition including all of the overlapping slices with this
526 // Collect all of the overlapping splittable slices.
535 // a partition spanning only splittable slices.
548 // the emptiness of the split slices. The latter is only relevant when
550 // slices list, but the prior may have the same P.SI and a tail of split
551 // slices.
554 "Same set of slices formed two different sized partitions!");
571 /// \brief A forward range over the partitions of the alloca's slices.
574 /// slices. It computes these partitions on the fly based on the overlapping
575 /// offsets of the slices and the ability to split them. It will visit "empty"
577 /// slices.
604 /// \brief Builder for the alloca slices.
606 /// This class builds a set of alloca slices by recursively visiting the uses
664 AS.Slices.push_back(Slice(BeginOffset, EndOffset, U, IsSplittable));
812 AS.Slices[MTPI->second].kill();
834 MemTransferSliceMap.insert(std::make_pair(&II, AS.Slices.size()));
837 Slice &PrevP = AS.Slices[PrevIdx];
855 assert(AS.Slices[PrevIdx].getUse()->getUser() == &II &&
999 Slices.erase(std::remove_if(Slices.begin(), Slices.end(),
1003 Slices.end());
1008 std::shuffle(Slices.begin(), Slices.end(), MT);
1014 std::sort(Slices.begin(), Slices.end());
1040 OS << "Can't analyze slices for alloca: " << AI << "\n"
1046 OS << "Slices of alloca: " << AI << "\n";
1059 /// sequence of slices.
1068 // always get consistent results regardless of the order of slices.
1098 // To avoid depending on the order of slices, Ty and TyIsCommon must not
1775 /// \brief Test whether the given alloca partitioning and range of slices can be
1994 // FIXME: We shouldn't consider split slices that happen to start in the
2274 // interchangeably for unsplit slices.
3348 // all the slices that end up split.
3431 // Now scan the already split slices, and add a split for any of them which
3525 // Collect the new slices which we will merge into the alloca slices.
3538 // load in a parallel structure. We also build the slices for them and append
3539 // them to the alloca slices.
3772 // Remove the killed slices that have ben pre-split.
3777 // Insert our new slices. This will sort and merge them into the sorted
3781 DEBUG(dbgs() << " Pre-split slices:\n");
3897 // Now that we've processed all the slices in the new partition, check if any
3951 /// \brief Walks the slices of an alloca and form partitions based on them,
4077 /// the slices of the alloca, and then hands it off to be split and
4102 // Build the slices
4126 // No slices to split. Leave the dead alloca for a later pass to clean up.