Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Segment

16 // individual segment is represented as an instance of LiveRange::Segment,
136 /// Return the end point of the last live range segment to interact with
150 /// It manages an ordered list of Segment objects.
153 /// segment with a new value number is used.
160 struct Segment {
163 VNInfo *valno; // identifier for the value contained in this segment.
165 Segment() : valno(nullptr) {}
167 Segment(SlotIndex S, SlotIndex E, VNInfo *V)
169 assert(S < E && "Cannot create empty or backwards segment");
172 /// Return true if the index is covered by this segment.
177 /// Return true if the given interval, [S, E), is covered by this segment.
183 bool operator<(const Segment &Other) const {
186 bool operator==(const Segment &Other) const {
193 typedef SmallVector<Segment, 2> Segments;
199 // The segment set is used temporarily to accelerate initial computation
201 // After that the set is flushed to the segment vector and deleted.
202 typedef std::set<Segment> SegmentSet;
237 for (const Segment &S : Other.segments) {
238 segments.push_back(Segment(S.start, S.end, valnos[S.valno->id]));
242 /// advanceTo - Advance the specified iterator to point to the Segment
244 /// end of the range. If no Segment contains this position, but the
246 /// Segment immediately after the hole.
263 /// find - Return an iterator pointing to the first segment that ends after
267 /// If Pos is contained in a Segment, that segment is returned.
268 /// If Pos is in a hole, the following Segment is returned.
378 /// Return the segment that contains the specified index, or null if there
380 const Segment *getSegmentContaining(SlotIndex Idx) const {
385 /// Return the live segment that contains the specified index, or null if
387 Segment *getSegmentContaining(SlotIndex Idx) {
406 /// Return an iterator to the segment that contains the specified index, or
449 /// Add the specified Segment to this range, merging segments as
450 /// appropriate. This returns an iterator to the inserted segment (which
452 iterator addSegment(Segment S);
456 /// there is no segment before @p Use, return nullptr.
467 /// True iff this segment is a single segment that lies between the
476 /// Remove the specified segment from this range. Note that the segment
477 /// must be a single Segment in its entirety.
481 void removeSegment(Segment S, bool RemoveDeadValNo = false) {
485 /// Remove segment pointed to by iterator @p I from this range. This does
495 // Find the segment that enters the instruction.
501 // Is this an instruction live-in segment?
511 // Move to the potentially live-out segment.
518 // segment if the value happens to be live out of the layout
524 // I now points to the segment that may be live-through, or defined by
540 for (const Segment &S : segments)
547 // Returns true if any segment in the live range contains any of the
558 /// Flush segment set into the regular segment vector.
560 /// has been created, if use of the segment set was
577 /// Append a segment to the list of segments.
578 void append(const LiveRange::Segment S);
582 void addSegmentToSet(Segment S);
772 raw_ostream &operator<<(raw_ostream &OS, const LiveRange::Segment &S);
774 inline bool operator<(SlotIndex V, const LiveRange::Segment &S) {
778 inline bool operator<(const LiveRange::Segment &S, SlotIndex V) {
795 SmallVector<LiveRange::Segment, 16> Spills;
805 /// Add a segment to LR and coalesce when possible, just like
808 void add(LiveRange::Segment);
811 add(LiveRange::Segment(Start, End, VNI));