Remove unused function.
[oota-llvm.git] / include / llvm / CodeGen / LiveInterval.h
1 //===-- llvm/CodeGen/LiveInterval.h - Interval representation ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the LiveRange and LiveInterval classes.  Given some
11 // numbering of each the machine instructions an interval [i, j) is said to be a
12 // live interval for register v if there is no instruction with number j' >= j
13 // such that v is live at j' and there is no instruction with number i' < i such
14 // that v is live at i'. In this implementation intervals can have holes,
15 // i.e. an interval might look like [1,20), [50,65), [1000,1001).  Each
16 // individual range is represented as an instance of LiveRange, and the whole
17 // interval is represented as an instance of LiveInterval.
18 //
19 //===----------------------------------------------------------------------===//
20
21 #ifndef LLVM_CODEGEN_LIVEINTERVAL_H
22 #define LLVM_CODEGEN_LIVEINTERVAL_H
23
24 #include "llvm/ADT/IntEqClasses.h"
25 #include "llvm/CodeGen/SlotIndexes.h"
26 #include "llvm/Support/AlignOf.h"
27 #include "llvm/Support/Allocator.h"
28 #include <cassert>
29 #include <climits>
30
31 namespace llvm {
32   class CoalescerPair;
33   class LiveIntervals;
34   class MachineInstr;
35   class MachineRegisterInfo;
36   class TargetRegisterInfo;
37   class raw_ostream;
38
39   /// VNInfo - Value Number Information.
40   /// This class holds information about a machine level values, including
41   /// definition and use points.
42   ///
43   class VNInfo {
44   public:
45     typedef BumpPtrAllocator Allocator;
46
47     /// The ID number of this value.
48     unsigned id;
49
50     /// The index of the defining instruction.
51     SlotIndex def;
52
53     /// VNInfo constructor.
54     VNInfo(unsigned i, SlotIndex d)
55       : id(i), def(d)
56     { }
57
58     /// VNInfo construtor, copies values from orig, except for the value number.
59     VNInfo(unsigned i, const VNInfo &orig)
60       : id(i), def(orig.def)
61     { }
62
63     /// Copy from the parameter into this VNInfo.
64     void copyFrom(VNInfo &src) {
65       def = src.def;
66     }
67
68     /// Returns true if this value is defined by a PHI instruction (or was,
69     /// PHI instrucions may have been eliminated).
70     /// PHI-defs begin at a block boundary, all other defs begin at register or
71     /// EC slots.
72     bool isPHIDef() const { return def.isBlock(); }
73
74     /// Returns true if this value is unused.
75     bool isUnused() const { return !def.isValid(); }
76
77     /// Mark this value as unused.
78     void markUnused() { def = SlotIndex(); }
79   };
80
81   /// LiveRange structure - This represents a simple register range in the
82   /// program, with an inclusive start point and an exclusive end point.
83   /// These ranges are rendered as [start,end).
84   struct LiveRange {
85     SlotIndex start;  // Start point of the interval (inclusive)
86     SlotIndex end;    // End point of the interval (exclusive)
87     VNInfo *valno;   // identifier for the value contained in this interval.
88
89     LiveRange() : valno(0) {}
90
91     LiveRange(SlotIndex S, SlotIndex E, VNInfo *V)
92       : start(S), end(E), valno(V) {
93       assert(S < E && "Cannot create empty or backwards range");
94     }
95
96     /// contains - Return true if the index is covered by this range.
97     ///
98     bool contains(SlotIndex I) const {
99       return start <= I && I < end;
100     }
101
102     /// containsRange - Return true if the given range, [S, E), is covered by
103     /// this range.
104     bool containsRange(SlotIndex S, SlotIndex E) const {
105       assert((S < E) && "Backwards interval?");
106       return (start <= S && S < end) && (start < E && E <= end);
107     }
108
109     bool operator<(const LiveRange &LR) const {
110       return start < LR.start || (start == LR.start && end < LR.end);
111     }
112     bool operator==(const LiveRange &LR) const {
113       return start == LR.start && end == LR.end;
114     }
115
116     void dump() const;
117     void print(raw_ostream &os) const;
118   };
119
120   template <> struct isPodLike<LiveRange> { static const bool value = true; };
121
122   raw_ostream& operator<<(raw_ostream& os, const LiveRange &LR);
123
124
125   inline bool operator<(SlotIndex V, const LiveRange &LR) {
126     return V < LR.start;
127   }
128
129   inline bool operator<(const LiveRange &LR, SlotIndex V) {
130     return LR.start < V;
131   }
132
133   /// LiveInterval - This class represents some number of live ranges for a
134   /// register or value.  This class also contains a bit of register allocator
135   /// state.
136   class LiveInterval {
137   public:
138
139     typedef SmallVector<LiveRange,4> Ranges;
140     typedef SmallVector<VNInfo*,4> VNInfoList;
141
142     const unsigned reg;  // the register or stack slot of this interval.
143     float weight;        // weight of this interval
144     Ranges ranges;       // the ranges in which this register is live
145     VNInfoList valnos;   // value#'s
146
147     LiveInterval(unsigned Reg, float Weight)
148       : reg(Reg), weight(Weight) {}
149
150     typedef Ranges::iterator iterator;
151     iterator begin() { return ranges.begin(); }
152     iterator end()   { return ranges.end(); }
153
154     typedef Ranges::const_iterator const_iterator;
155     const_iterator begin() const { return ranges.begin(); }
156     const_iterator end() const  { return ranges.end(); }
157
158     typedef VNInfoList::iterator vni_iterator;
159     vni_iterator vni_begin() { return valnos.begin(); }
160     vni_iterator vni_end() { return valnos.end(); }
161
162     typedef VNInfoList::const_iterator const_vni_iterator;
163     const_vni_iterator vni_begin() const { return valnos.begin(); }
164     const_vni_iterator vni_end() const { return valnos.end(); }
165
166     /// advanceTo - Advance the specified iterator to point to the LiveRange
167     /// containing the specified position, or end() if the position is past the
168     /// end of the interval.  If no LiveRange contains this position, but the
169     /// position is in a hole, this method returns an iterator pointing to the
170     /// LiveRange immediately after the hole.
171     iterator advanceTo(iterator I, SlotIndex Pos) {
172       assert(I != end());
173       if (Pos >= endIndex())
174         return end();
175       while (I->end <= Pos) ++I;
176       return I;
177     }
178
179     /// find - Return an iterator pointing to the first range that ends after
180     /// Pos, or end(). This is the same as advanceTo(begin(), Pos), but faster
181     /// when searching large intervals.
182     ///
183     /// If Pos is contained in a LiveRange, that range is returned.
184     /// If Pos is in a hole, the following LiveRange is returned.
185     /// If Pos is beyond endIndex, end() is returned.
186     iterator find(SlotIndex Pos);
187
188     const_iterator find(SlotIndex Pos) const {
189       return const_cast<LiveInterval*>(this)->find(Pos);
190     }
191
192     void clear() {
193       valnos.clear();
194       ranges.clear();
195     }
196
197     bool hasAtLeastOneValue() const { return !valnos.empty(); }
198
199     bool containsOneValue() const { return valnos.size() == 1; }
200
201     unsigned getNumValNums() const { return (unsigned)valnos.size(); }
202
203     /// getValNumInfo - Returns pointer to the specified val#.
204     ///
205     inline VNInfo *getValNumInfo(unsigned ValNo) {
206       return valnos[ValNo];
207     }
208     inline const VNInfo *getValNumInfo(unsigned ValNo) const {
209       return valnos[ValNo];
210     }
211
212     /// containsValue - Returns true if VNI belongs to this interval.
213     bool containsValue(const VNInfo *VNI) const {
214       return VNI && VNI->id < getNumValNums() && VNI == getValNumInfo(VNI->id);
215     }
216
217     /// getNextValue - Create a new value number and return it.  MIIdx specifies
218     /// the instruction that defines the value number.
219     VNInfo *getNextValue(SlotIndex def, VNInfo::Allocator &VNInfoAllocator) {
220       VNInfo *VNI =
221         new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), def);
222       valnos.push_back(VNI);
223       return VNI;
224     }
225
226     /// createDeadDef - Make sure the interval has a value defined at Def.
227     /// If one already exists, return it. Otherwise allocate a new value and
228     /// add liveness for a dead def.
229     VNInfo *createDeadDef(SlotIndex Def, VNInfo::Allocator &VNInfoAllocator);
230
231     /// Create a copy of the given value. The new value will be identical except
232     /// for the Value number.
233     VNInfo *createValueCopy(const VNInfo *orig,
234                             VNInfo::Allocator &VNInfoAllocator) {
235       VNInfo *VNI =
236         new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), *orig);
237       valnos.push_back(VNI);
238       return VNI;
239     }
240
241     /// RenumberValues - Renumber all values in order of appearance and remove
242     /// unused values.
243     void RenumberValues(LiveIntervals &lis);
244
245     /// MergeValueNumberInto - This method is called when two value nubmers
246     /// are found to be equivalent.  This eliminates V1, replacing all
247     /// LiveRanges with the V1 value number with the V2 value number.  This can
248     /// cause merging of V1/V2 values numbers and compaction of the value space.
249     VNInfo* MergeValueNumberInto(VNInfo *V1, VNInfo *V2);
250
251     /// MergeValueInAsValue - Merge all of the live ranges of a specific val#
252     /// in RHS into this live interval as the specified value number.
253     /// The LiveRanges in RHS are allowed to overlap with LiveRanges in the
254     /// current interval, it will replace the value numbers of the overlaped
255     /// live ranges with the specified value number.
256     void MergeRangesInAsValue(const LiveInterval &RHS, VNInfo *LHSValNo);
257
258     /// MergeValueInAsValue - Merge all of the live ranges of a specific val#
259     /// in RHS into this live interval as the specified value number.
260     /// The LiveRanges in RHS are allowed to overlap with LiveRanges in the
261     /// current interval, but only if the overlapping LiveRanges have the
262     /// specified value number.
263     void MergeValueInAsValue(const LiveInterval &RHS,
264                              const VNInfo *RHSValNo, VNInfo *LHSValNo);
265
266     bool empty() const { return ranges.empty(); }
267
268     /// beginIndex - Return the lowest numbered slot covered by interval.
269     SlotIndex beginIndex() const {
270       assert(!empty() && "Call to beginIndex() on empty interval.");
271       return ranges.front().start;
272     }
273
274     /// endNumber - return the maximum point of the interval of the whole,
275     /// exclusive.
276     SlotIndex endIndex() const {
277       assert(!empty() && "Call to endIndex() on empty interval.");
278       return ranges.back().end;
279     }
280
281     bool expiredAt(SlotIndex index) const {
282       return index >= endIndex();
283     }
284
285     bool liveAt(SlotIndex index) const {
286       const_iterator r = find(index);
287       return r != end() && r->start <= index;
288     }
289
290     /// killedAt - Return true if a live range ends at index. Note that the kill
291     /// point is not contained in the half-open live range. It is usually the
292     /// getDefIndex() slot following its last use.
293     bool killedAt(SlotIndex index) const {
294       const_iterator r = find(index.getRegSlot(true));
295       return r != end() && r->end == index;
296     }
297
298     /// getLiveRangeContaining - Return the live range that contains the
299     /// specified index, or null if there is none.
300     const LiveRange *getLiveRangeContaining(SlotIndex Idx) const {
301       const_iterator I = FindLiveRangeContaining(Idx);
302       return I == end() ? 0 : &*I;
303     }
304
305     /// getLiveRangeContaining - Return the live range that contains the
306     /// specified index, or null if there is none.
307     LiveRange *getLiveRangeContaining(SlotIndex Idx) {
308       iterator I = FindLiveRangeContaining(Idx);
309       return I == end() ? 0 : &*I;
310     }
311
312     /// getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.
313     VNInfo *getVNInfoAt(SlotIndex Idx) const {
314       const_iterator I = FindLiveRangeContaining(Idx);
315       return I == end() ? 0 : I->valno;
316     }
317
318     /// getVNInfoBefore - Return the VNInfo that is live up to but not
319     /// necessarilly including Idx, or NULL. Use this to find the reaching def
320     /// used by an instruction at this SlotIndex position.
321     VNInfo *getVNInfoBefore(SlotIndex Idx) const {
322       const_iterator I = FindLiveRangeContaining(Idx.getPrevSlot());
323       return I == end() ? 0 : I->valno;
324     }
325
326     /// FindLiveRangeContaining - Return an iterator to the live range that
327     /// contains the specified index, or end() if there is none.
328     iterator FindLiveRangeContaining(SlotIndex Idx) {
329       iterator I = find(Idx);
330       return I != end() && I->start <= Idx ? I : end();
331     }
332
333     const_iterator FindLiveRangeContaining(SlotIndex Idx) const {
334       const_iterator I = find(Idx);
335       return I != end() && I->start <= Idx ? I : end();
336     }
337
338     /// overlaps - Return true if the intersection of the two live intervals is
339     /// not empty.
340     bool overlaps(const LiveInterval& other) const {
341       if (other.empty())
342         return false;
343       return overlapsFrom(other, other.begin());
344     }
345
346     /// overlaps - Return true if the two intervals have overlapping segments
347     /// that are not coalescable according to CP.
348     ///
349     /// Overlapping segments where one interval is defined by a coalescable
350     /// copy are allowed.
351     bool overlaps(const LiveInterval &Other, const CoalescerPair &CP,
352                   const SlotIndexes&) const;
353
354     /// overlaps - Return true if the live interval overlaps a range specified
355     /// by [Start, End).
356     bool overlaps(SlotIndex Start, SlotIndex End) const;
357
358     /// overlapsFrom - Return true if the intersection of the two live intervals
359     /// is not empty.  The specified iterator is a hint that we can begin
360     /// scanning the Other interval starting at I.
361     bool overlapsFrom(const LiveInterval& other, const_iterator I) const;
362
363     /// addRange - Add the specified LiveRange to this interval, merging
364     /// intervals as appropriate.  This returns an iterator to the inserted live
365     /// range (which may have grown since it was inserted.
366     iterator addRange(LiveRange LR) {
367       return addRangeFrom(LR, ranges.begin());
368     }
369
370     /// extendInBlock - If this interval is live before Kill in the basic block
371     /// that starts at StartIdx, extend it to be live up to Kill, and return
372     /// the value. If there is no live range before Kill, return NULL.
373     VNInfo *extendInBlock(SlotIndex StartIdx, SlotIndex Kill);
374
375     /// join - Join two live intervals (this, and other) together.  This applies
376     /// mappings to the value numbers in the LHS/RHS intervals as specified.  If
377     /// the intervals are not joinable, this aborts.
378     void join(LiveInterval &Other,
379               const int *ValNoAssignments,
380               const int *RHSValNoAssignments,
381               SmallVectorImpl<VNInfo *> &NewVNInfo,
382               MachineRegisterInfo *MRI);
383
384     /// True iff this live range is a single segment that lies between the
385     /// specified boundaries, exclusively. Vregs live across a backedge are not
386     /// considered local. The boundaries are expected to lie within an extended
387     /// basic block, so vregs that are not live out should contain no holes.
388     bool isLocal(SlotIndex Start, SlotIndex End) const {
389       return beginIndex() > Start.getBaseIndex() &&
390         endIndex() < End.getBoundaryIndex();
391     }
392
393     /// removeRange - Remove the specified range from this interval.  Note that
394     /// the range must be a single LiveRange in its entirety.
395     void removeRange(SlotIndex Start, SlotIndex End,
396                      bool RemoveDeadValNo = false);
397
398     void removeRange(LiveRange LR, bool RemoveDeadValNo = false) {
399       removeRange(LR.start, LR.end, RemoveDeadValNo);
400     }
401
402     /// removeValNo - Remove all the ranges defined by the specified value#.
403     /// Also remove the value# from value# list.
404     void removeValNo(VNInfo *ValNo);
405
406     /// getSize - Returns the sum of sizes of all the LiveRange's.
407     ///
408     unsigned getSize() const;
409
410     /// Returns true if the live interval is zero length, i.e. no live ranges
411     /// span instructions. It doesn't pay to spill such an interval.
412     bool isZeroLength(SlotIndexes *Indexes) const {
413       for (const_iterator i = begin(), e = end(); i != e; ++i)
414         if (Indexes->getNextNonNullIndex(i->start).getBaseIndex() <
415             i->end.getBaseIndex())
416           return false;
417       return true;
418     }
419
420     /// isSpillable - Can this interval be spilled?
421     bool isSpillable() const {
422       return weight != HUGE_VALF;
423     }
424
425     /// markNotSpillable - Mark interval as not spillable
426     void markNotSpillable() {
427       weight = HUGE_VALF;
428     }
429
430     bool operator<(const LiveInterval& other) const {
431       const SlotIndex &thisIndex = beginIndex();
432       const SlotIndex &otherIndex = other.beginIndex();
433       return (thisIndex < otherIndex ||
434               (thisIndex == otherIndex && reg < other.reg));
435     }
436
437     void print(raw_ostream &OS) const;
438     void dump() const;
439
440     /// \brief Walk the interval and assert if any invariants fail to hold.
441     ///
442     /// Note that this is a no-op when asserts are disabled.
443 #ifdef NDEBUG
444     void verify() const {}
445 #else
446     void verify() const;
447 #endif
448
449   private:
450
451     Ranges::iterator addRangeFrom(LiveRange LR, Ranges::iterator From);
452     void extendIntervalEndTo(Ranges::iterator I, SlotIndex NewEnd);
453     Ranges::iterator extendIntervalStartTo(Ranges::iterator I, SlotIndex NewStr);
454     void markValNoForDeletion(VNInfo *V);
455
456     LiveInterval& operator=(const LiveInterval& rhs) LLVM_DELETED_FUNCTION;
457
458   };
459
460   inline raw_ostream &operator<<(raw_ostream &OS, const LiveInterval &LI) {
461     LI.print(OS);
462     return OS;
463   }
464
465   /// Helper class for performant LiveInterval bulk updates.
466   ///
467   /// Calling LiveInterval::addRange() repeatedly can be expensive on large
468   /// live ranges because segments after the insertion point may need to be
469   /// shifted. The LiveRangeUpdater class can defer the shifting when adding
470   /// many segments in order.
471   ///
472   /// The LiveInterval will be in an invalid state until flush() is called.
473   class LiveRangeUpdater {
474     LiveInterval *LI;
475     SlotIndex LastStart;
476     LiveInterval::iterator WriteI;
477     LiveInterval::iterator ReadI;
478     SmallVector<LiveRange, 16> Spills;
479     void mergeSpills();
480
481   public:
482     /// Create a LiveRangeUpdater for adding segments to LI.
483     /// LI will temporarily be in an invalid state until flush() is called.
484     LiveRangeUpdater(LiveInterval *li = 0) : LI(li) {}
485
486     ~LiveRangeUpdater() { flush(); }
487
488     /// Add a segment to LI and coalesce when possible, just like LI.addRange().
489     /// Segments should be added in increasing start order for best performance.
490     void add(LiveRange);
491
492     void add(SlotIndex Start, SlotIndex End, VNInfo *VNI) {
493       add(LiveRange(Start, End, VNI));
494     }
495
496     /// Return true if the LI is currently in an invalid state, and flush()
497     /// needs to be called.
498     bool isDirty() const { return LastStart.isValid(); }
499
500     /// Flush the updater state to LI so it is valid and contains all added
501     /// segments.
502     void flush();
503
504     /// Select a different destination live range.
505     void setDest(LiveInterval *li) {
506       if (LI != li && isDirty())
507         flush();
508       LI = li;
509     }
510
511     /// Get the current destination live range.
512     LiveInterval *getDest() const { return LI; }
513
514     void dump() const;
515     void print(raw_ostream&) const;
516   };
517
518   inline raw_ostream &operator<<(raw_ostream &OS, const LiveRangeUpdater &X) {
519     X.print(OS);
520     return OS;
521   }
522
523   /// LiveRangeQuery - Query information about a live range around a given
524   /// instruction. This class hides the implementation details of live ranges,
525   /// and it should be used as the primary interface for examining live ranges
526   /// around instructions.
527   ///
528   class LiveRangeQuery {
529     VNInfo *EarlyVal;
530     VNInfo *LateVal;
531     SlotIndex EndPoint;
532     bool Kill;
533
534   public:
535     /// Create a LiveRangeQuery for the given live range and instruction index.
536     /// The sub-instruction slot of Idx doesn't matter, only the instruction it
537     /// refers to is considered.
538     LiveRangeQuery(const LiveInterval &LI, SlotIndex Idx)
539       : EarlyVal(0), LateVal(0), Kill(false) {
540       // Find the segment that enters the instruction.
541       LiveInterval::const_iterator I = LI.find(Idx.getBaseIndex());
542       LiveInterval::const_iterator E = LI.end();
543       if (I == E)
544         return;
545       // Is this an instruction live-in segment?
546       // If Idx is the start index of a basic block, include live-in segments
547       // that start at Idx.getBaseIndex().
548       if (I->start <= Idx.getBaseIndex()) {
549         EarlyVal = I->valno;
550         EndPoint = I->end;
551         // Move to the potentially live-out segment.
552         if (SlotIndex::isSameInstr(Idx, I->end)) {
553           Kill = true;
554           if (++I == E)
555             return;
556         }
557         // Special case: A PHIDef value can have its def in the middle of a
558         // segment if the value happens to be live out of the layout
559         // predecessor.
560         // Such a value is not live-in.
561         if (EarlyVal->def == Idx.getBaseIndex())
562           EarlyVal = 0;
563       }
564       // I now points to the segment that may be live-through, or defined by
565       // this instr. Ignore segments starting after the current instr.
566       if (SlotIndex::isEarlierInstr(Idx, I->start))
567         return;
568       LateVal = I->valno;
569       EndPoint = I->end;
570     }
571
572     /// Return the value that is live-in to the instruction. This is the value
573     /// that will be read by the instruction's use operands. Return NULL if no
574     /// value is live-in.
575     VNInfo *valueIn() const {
576       return EarlyVal;
577     }
578
579     /// Return true if the live-in value is killed by this instruction. This
580     /// means that either the live range ends at the instruction, or it changes
581     /// value.
582     bool isKill() const {
583       return Kill;
584     }
585
586     /// Return true if this instruction has a dead def.
587     bool isDeadDef() const {
588       return EndPoint.isDead();
589     }
590
591     /// Return the value leaving the instruction, if any. This can be a
592     /// live-through value, or a live def. A dead def returns NULL.
593     VNInfo *valueOut() const {
594       return isDeadDef() ? 0 : LateVal;
595     }
596
597     /// Return the value defined by this instruction, if any. This includes
598     /// dead defs, it is the value created by the instruction's def operands.
599     VNInfo *valueDefined() const {
600       return EarlyVal == LateVal ? 0 : LateVal;
601     }
602
603     /// Return the end point of the last live range segment to interact with
604     /// the instruction, if any.
605     ///
606     /// The end point is an invalid SlotIndex only if the live range doesn't
607     /// intersect the instruction at all.
608     ///
609     /// The end point may be at or past the end of the instruction's basic
610     /// block. That means the value was live out of the block.
611     SlotIndex endPoint() const {
612       return EndPoint;
613     }
614   };
615
616   /// ConnectedVNInfoEqClasses - Helper class that can divide VNInfos in a
617   /// LiveInterval into equivalence clases of connected components. A
618   /// LiveInterval that has multiple connected components can be broken into
619   /// multiple LiveIntervals.
620   ///
621   /// Given a LiveInterval that may have multiple connected components, run:
622   ///
623   ///   unsigned numComps = ConEQ.Classify(LI);
624   ///   if (numComps > 1) {
625   ///     // allocate numComps-1 new LiveIntervals into LIS[1..]
626   ///     ConEQ.Distribute(LIS);
627   /// }
628
629   class ConnectedVNInfoEqClasses {
630     LiveIntervals &LIS;
631     IntEqClasses EqClass;
632
633     // Note that values a and b are connected.
634     void Connect(unsigned a, unsigned b);
635
636     unsigned Renumber();
637
638   public:
639     explicit ConnectedVNInfoEqClasses(LiveIntervals &lis) : LIS(lis) {}
640
641     /// Classify - Classify the values in LI into connected components.
642     /// Return the number of connected components.
643     unsigned Classify(const LiveInterval *LI);
644
645     /// getEqClass - Classify creates equivalence classes numbered 0..N. Return
646     /// the equivalence class assigned the VNI.
647     unsigned getEqClass(const VNInfo *VNI) const { return EqClass[VNI->id]; }
648
649     /// Distribute - Distribute values in LIV[0] into a separate LiveInterval
650     /// for each connected component. LIV must have a LiveInterval for each
651     /// connected component. The LiveIntervals in Liv[1..] must be empty.
652     /// Instructions using LIV[0] are rewritten.
653     void Distribute(LiveInterval *LIV[], MachineRegisterInfo &MRI);
654
655   };
656
657 }
658 #endif