Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:segments

66     if (I == segments().end()) {
88 segments().insert(I, Segment(Def, Def.getDeadSlot(), VNI));
93 if (segments().empty())
97 if (I == segments().begin())
109 /// merge and eliminate all segments that this will overlap
112 assert(I != segments().end() && "Not a valid segment!");
118 for (; MergeTo != segments().end() && NewEnd >= MergeTo->end; ++MergeTo)
125 // have the same value number, merge the two segments into one segment.
126 if (MergeTo != segments().end() && MergeTo->start <= I->end &&
132 // Erase any dead segments.
133 segments().erase(std::next(I), MergeTo);
138 /// merge and eliminate all segments that this will overlap with.
140 assert(I != segments().end() && "Not a valid segment!");
147 if (MergeTo == segments().begin()) {
149 segments().erase(MergeTo, I);
168 segments().erase(std::next(MergeTo), std::next(I));
178 if (I != segments().begin()) {
186 // Check to make sure that we are not overlapping two live segments with
189 "Cannot overlap two segments with differing ValID's"
196 if (I != segments().end()) {
208 // Check to make sure that we are not overlapping two live segments with
211 "Cannot overlap two segments with differing ValID's");
218 return segments().insert(I, S);
224 CollectionT &segments() { return impl().segmentsColl(); }
236 LiveRange::Segments> CalcLiveRangeUtilVectorBase;
245 LiveRange::Segments &segmentsColl() { return LR->segments; }
247 void insertAtEnd(const Segment &S) { LR->segments.push_back(S); }
445 for (const Segment &O : Other.segments) {
450 // Check adjacent live segments and see if we can get behind O.end.
480 for (const Segment &S : segments) {
506 assert(segments.empty() || segments.back().end <= S.start);
507 segments.push_back(S);
549 segments.erase(I); // Removed the whole Segment.
567 segments.insert(std::next(I), Segment(End, OldEnd, ValNo));
570 /// removeValNo - Remove all the segments defined by the specified value#.
574 segments.erase(std::remove_if(begin(), end(), [ValNo](const Segment &S) {
626 // If we merge some segments, chop off the end.
628 segments.erase(OutIt, end());
633 // touching segments that now have identical values. That's OK since Other is
635 for (Segment &S : Other.segments)
654 // Okay, now insert the RHS live segments into the LHS.
656 for (Segment &S : Other.segments)
660 /// Merge all of the segments in RHS into this live range as the specified
661 /// value number. The segments in RHS are allowed to overlap with segments in
662 /// the current range, but only if the overlapping segments have the
667 for (const Segment &S : RHS.segments)
671 /// MergeValueInAsValue - Merge all of the live segments of a specific val#
673 /// The segments in RHS are allowed to overlap with segments in the
675 /// segments with the specified value number.
680 for (const Segment &S : RHS.segments)
687 /// segments with the V1 value number with the V2 value number. This can
703 // Merge V1 segments into V2.
716 segments.erase(S);
726 // If we can merge it into later V2 segments, do so now. We ignore any
727 // following V1 segments, as they will be merged in subsequent iterations
732 segments.erase(I);
747 segments.empty() &&
749 segments.append(segmentSet->begin(), segmentSet->end());
766 // If there are no segments that end after the first slot, we're done.
822 for (const Segment &S : segments)
841 for (const Segment &S : segments) {
945 // Otherwise, segments are kept in three separate areas:
952 // - Segments in all three areas are fully ordered and coalesced.
953 // - Segments in area 1 precede and can't coalesce with segments in area 2.
954 // - Segments in Spills precede and can't coalesce with segments in area 2.
955 // - No coalescing is possible between segments in Spills and segments in area
956 // 1, and there are no overlapping segments.
958 // The segments in Spills are not ordered with respect to the segments in area
994 assert(A.start <= B.start && "Unordered live segments.");
1018 assert(Spills.empty() && "Leftover spilled segments");
1079 LR->segments.push_back(Seg);
1085 // Merge as many spilled segments as possible into the gap between WriteI
1120 LR->segments.erase(WriteI, ReadI);
1130 LR->segments.insert(ReadI, Spills.size() - GapSize, LiveRange::Segment());
1135 LR->segments.erase(WriteI + Spills.size(), ReadI);