Lines Matching refs:segments
93 if (I == segments().end()) {
116 segments().insert(I, Segment(Def, Def.getDeadSlot(), VNI));
121 if (segments().empty())
125 if (I == segments().begin())
137 if (segments().empty())
141 if (I == segments().begin())
156 /// merge and eliminate all segments that this will overlap
159 assert(I != segments().end() && "Not a valid segment!");
165 for (; MergeTo != segments().end() && NewEnd >= MergeTo->end; ++MergeTo)
172 // have the same value number, merge the two segments into one segment.
173 if (MergeTo != segments().end() && MergeTo->start <= I->end &&
179 // Erase any dead segments.
180 segments().erase(std::next(I), MergeTo);
185 /// merge and eliminate all segments that this will overlap with.
187 assert(I != segments().end() && "Not a valid segment!");
194 if (MergeTo == segments().begin()) {
196 segments().erase(MergeTo, I);
215 segments().erase(std::next(MergeTo), std::next(I));
225 if (I != segments().begin()) {
233 // Check to make sure that we are not overlapping two live segments with
236 "Cannot overlap two segments with differing ValID's"
243 if (I != segments().end()) {
255 // Check to make sure that we are not overlapping two live segments with
258 "Cannot overlap two segments with differing ValID's");
265 return segments().insert(I, S);
271 CollectionT &segments() { return impl().segmentsColl(); }
293 LiveRange::Segments &segmentsColl() { return LR->segments; }
295 void insertAtEnd(const Segment &S) { LR->segments.push_back(S); }
484 for (const Segment &O : Other.segments) {
489 // Check adjacent live segments and see if we can get behind O.end.
519 for (const Segment &S : segments) {
545 assert(segments.empty() || segments.back().end <= S.start);
546 segments.push_back(S);
582 segments.erase(I); // Removed the whole Segment.
603 segments.insert(std::next(I), Segment(End, OldEnd, ValNo));
608 I = segments.erase(I);
619 /// removeValNo - Remove all the segments defined by the specified value#.
623 llvm::erase_if(segments,
675 // If we merge some segments, chop off the end.
677 segments.erase(OutIt, end());
682 // touching segments that now have identical values. That's OK since Other is
684 for (Segment &S : Other.segments)
703 // Okay, now insert the RHS live segments into the LHS.
705 for (Segment &S : Other.segments)
709 /// Merge all of the segments in RHS into this live range as the specified
710 /// value number. The segments in RHS are allowed to overlap with segments in
711 /// the current range, but only if the overlapping segments have the
716 for (const Segment &S : RHS.segments)
720 /// MergeValueInAsValue - Merge all of the live segments of a specific val#
722 /// The segments in RHS are allowed to overlap with segments in the
724 /// segments with the specified value number.
729 for (const Segment &S : RHS.segments)
736 /// segments with the V1 value number with the V2 value number. This can
752 // Merge V1 segments into V2.
765 segments.erase(S);
775 // If we can merge it into later V2 segments, do so now. We ignore any
776 // following V1 segments, as they will be merged in subsequent iterations
781 segments.erase(I);
796 segments.empty() &&
798 segments.append(segmentSet->begin(), segmentSet->end());
815 // If there are no segments that end after the first slot, we're done.
960 for (const Segment &S : segments)
1003 for (const Segment &S : segments) {
1108 // Otherwise, segments are kept in three separate areas:
1116 // - Segments in area 1 precede and can't coalesce with segments in area 2.
1117 // - Segments in Spills precede and can't coalesce with segments in area 2.
1118 // - No coalescing is possible between segments in Spills and segments in area
1119 // 1, and there are no overlapping segments.
1121 // The segments in Spills are not ordered with respect to the segments in area
1159 assert(A.start <= B.start && "Unordered live segments.");
1183 assert(Spills.empty() && "Leftover spilled segments");
1244 LR->segments.push_back(Seg);
1250 // Merge as many spilled segments as possible into the gap between WriteI
1285 LR->segments.erase(WriteI, ReadI);
1295 LR->segments.insert(ReadI, Spills.size() - GapSize, LiveRange::Segment());
1300 LR->segments.erase(WriteI + Spills.size(), ReadI);