|
LLVM
3.7.0
|
LiveInterval - This class represents the liveness of a register, or stack slot. More...
#include <LiveInterval.h>
Classes | |
| class | SingleLinkedListIterator |
| class | SubRange |
| A live range for subregisters. More... | |
Public Types | |
| typedef LiveRange | super |
| typedef SingleLinkedListIterator < SubRange > | subrange_iterator |
| typedef SingleLinkedListIterator < const SubRange > | const_subrange_iterator |
Public Types inherited from llvm::LiveRange | |
| typedef SmallVector< Segment, 4 > | Segments |
| typedef SmallVector< VNInfo *, 4 > | VNInfoList |
| typedef std::set< Segment > | SegmentSet |
| typedef Segments::iterator | iterator |
| typedef Segments::const_iterator | const_iterator |
| typedef VNInfoList::iterator | vni_iterator |
| typedef VNInfoList::const_iterator | const_vni_iterator |
Public Member Functions | |
| LiveInterval (unsigned Reg, float Weight) | |
| ~LiveInterval () | |
| subrange_iterator | subrange_begin () |
| subrange_iterator | subrange_end () |
| const_subrange_iterator | subrange_begin () const |
| const_subrange_iterator | subrange_end () const |
| iterator_range< subrange_iterator > | subranges () |
| iterator_range < const_subrange_iterator > | subranges () const |
| SubRange * | createSubRange (BumpPtrAllocator &Allocator, unsigned LaneMask) |
| Creates a new empty subregister live range. More... | |
| SubRange * | createSubRangeFrom (BumpPtrAllocator &Allocator, unsigned LaneMask, const LiveRange &CopyFrom) |
Like createSubRange() but the new range is filled with a copy of the liveness information in CopyFrom. More... | |
| bool | hasSubRanges () const |
| Returns true if subregister liveness information is available. More... | |
| void | clearSubRanges () |
| Removes all subregister liveness information. More... | |
| void | removeEmptySubRanges () |
| Removes all subranges without any segments (subranges without segments are not considered valid and should only exist temporarily). More... | |
| void | constructMainRangeFromSubranges (const SlotIndexes &Indexes, VNInfo::Allocator &VNIAllocator) |
Construct main live range by merging the SubRanges of LI. More... | |
| unsigned | getSize () const |
| getSize - Returns the sum of sizes of all the LiveRange's. More... | |
| bool | isSpillable () const |
| isSpillable - Can this interval be spilled? More... | |
| void | markNotSpillable () |
| markNotSpillable - Mark interval as not spillable More... | |
| bool | operator< (const LiveInterval &other) const |
| void | print (raw_ostream &OS) const |
| void | dump () const |
| void | verify (const MachineRegisterInfo *MRI=nullptr) const |
| Walks the interval and assert if any invariants fail to hold. More... | |
Public Member Functions inherited from llvm::LiveRange | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| vni_iterator | vni_begin () |
| vni_iterator | vni_end () |
| const_vni_iterator | vni_begin () const |
| const_vni_iterator | vni_end () const |
| LiveRange (bool UseSegmentSet=false) | |
| Constructs a new LiveRange object. More... | |
| LiveRange (const LiveRange &Other, BumpPtrAllocator &Allocator) | |
| Constructs a new LiveRange object by copying segments and valnos from another LiveRange. More... | |
| iterator | advanceTo (iterator I, SlotIndex Pos) |
| advanceTo - Advance the specified iterator to point to the Segment containing the specified position, or end() if the position is past the end of the range. More... | |
| const_iterator | advanceTo (const_iterator I, SlotIndex Pos) const |
| iterator | find (SlotIndex Pos) |
| find - Return an iterator pointing to the first segment that ends after Pos, or end(). More... | |
| const_iterator | find (SlotIndex Pos) const |
| void | clear () |
| size_t | size () const |
| bool | hasAtLeastOneValue () const |
| bool | containsOneValue () const |
| unsigned | getNumValNums () const |
| VNInfo * | getValNumInfo (unsigned ValNo) |
| getValNumInfo - Returns pointer to the specified val#. More... | |
| const VNInfo * | getValNumInfo (unsigned ValNo) const |
| bool | containsValue (const VNInfo *VNI) const |
| containsValue - Returns true if VNI belongs to this range. More... | |
| VNInfo * | getNextValue (SlotIndex def, VNInfo::Allocator &VNInfoAllocator) |
| getNextValue - Create a new value number and return it. More... | |
| VNInfo * | createDeadDef (SlotIndex Def, VNInfo::Allocator &VNInfoAllocator) |
| createDeadDef - Make sure the range has a value defined at Def. More... | |
| VNInfo * | createValueCopy (const VNInfo *orig, VNInfo::Allocator &VNInfoAllocator) |
| Create a copy of the given value. More... | |
| void | RenumberValues () |
| RenumberValues - Renumber all values in order of appearance and remove unused values. More... | |
| VNInfo * | MergeValueNumberInto (VNInfo *V1, VNInfo *V2) |
| MergeValueNumberInto - This method is called when two value numbers are found to be equivalent. More... | |
| void | MergeSegmentsInAsValue (const LiveRange &RHS, VNInfo *LHSValNo) |
| Merge all of the live segments of a specific val# in RHS into this live range as the specified value number. More... | |
| void | MergeValueInAsValue (const LiveRange &RHS, const VNInfo *RHSValNo, VNInfo *LHSValNo) |
| MergeValueInAsValue - Merge all of the segments of a specific val# in RHS into this live range as the specified value number. More... | |
| bool | empty () const |
| SlotIndex | beginIndex () const |
| beginIndex - Return the lowest numbered slot covered. More... | |
| SlotIndex | endIndex () const |
| endNumber - return the maximum point of the range of the whole, exclusive. More... | |
| bool | expiredAt (SlotIndex index) const |
| bool | liveAt (SlotIndex index) const |
| const Segment * | getSegmentContaining (SlotIndex Idx) const |
| Return the segment that contains the specified index, or null if there is none. More... | |
| Segment * | getSegmentContaining (SlotIndex Idx) |
| Return the live segment that contains the specified index, or null if there is none. More... | |
| VNInfo * | getVNInfoAt (SlotIndex Idx) const |
| getVNInfoAt - Return the VNInfo that is live at Idx, or NULL. More... | |
| VNInfo * | getVNInfoBefore (SlotIndex Idx) const |
| getVNInfoBefore - Return the VNInfo that is live up to but not necessarilly including Idx, or NULL. More... | |
| iterator | FindSegmentContaining (SlotIndex Idx) |
| Return an iterator to the segment that contains the specified index, or end() if there is none. More... | |
| const_iterator | FindSegmentContaining (SlotIndex Idx) const |
| bool | overlaps (const LiveRange &other) const |
| overlaps - Return true if the intersection of the two live ranges is not empty. More... | |
| bool | overlaps (const LiveRange &Other, const CoalescerPair &CP, const SlotIndexes &) const |
| overlaps - Return true if the two ranges have overlapping segments that are not coalescable according to CP. More... | |
| bool | overlaps (SlotIndex Start, SlotIndex End) const |
| overlaps - Return true if the live range overlaps an interval specified by [Start, End). More... | |
| bool | overlapsFrom (const LiveRange &Other, const_iterator I) const |
| overlapsFrom - Return true if the intersection of the two live ranges is not empty. More... | |
| bool | covers (const LiveRange &Other) const |
Returns true if all segments of the Other live range are completely covered by this live range. More... | |
| iterator | addSegment (Segment S) |
| Add the specified Segment to this range, merging segments as appropriate. More... | |
| VNInfo * | extendInBlock (SlotIndex StartIdx, SlotIndex Use) |
If this range is live before Use in the basic block that starts at StartIdx, extend it to be live up to Use, and return the value. More... | |
| void | join (LiveRange &Other, const int *ValNoAssignments, const int *RHSValNoAssignments, SmallVectorImpl< VNInfo * > &NewVNInfo) |
| join - Join two live ranges (this, and other) together. More... | |
| bool | isLocal (SlotIndex Start, SlotIndex End) const |
| True iff this segment is a single segment that lies between the specified boundaries, exclusively. More... | |
| void | removeSegment (SlotIndex Start, SlotIndex End, bool RemoveDeadValNo=false) |
| Remove the specified segment from this range. More... | |
| void | removeSegment (Segment S, bool RemoveDeadValNo=false) |
| iterator | removeSegment (iterator I) |
Remove segment pointed to by iterator I from this range. More... | |
| LiveQueryResult | Query (SlotIndex Idx) const |
| Query Liveness at Idx. More... | |
| void | removeValNo (VNInfo *ValNo) |
| removeValNo - Remove all the segments defined by the specified value#. More... | |
| bool | isZeroLength (SlotIndexes *Indexes) const |
| Returns true if the live range is zero length, i.e. More... | |
| bool | operator< (const LiveRange &other) const |
| void | flushSegmentSet () |
| Flush segment set into the regular segment vector. More... | |
| void | print (raw_ostream &OS) const |
| void | dump () const |
| void | verify () const |
| Walk the range and assert if any invariants fail to hold. More... | |
Public Attributes | |
| const unsigned | reg |
| float | weight |
Public Attributes inherited from llvm::LiveRange | |
| Segments | segments |
| VNInfoList | valnos |
| std::unique_ptr< SegmentSet > | segmentSet |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::LiveRange | |
| void | append (const LiveRange::Segment S) |
| Append a segment to the list of segments. More... | |
LiveInterval - This class represents the liveness of a register, or stack slot.
Definition at line 588 of file LiveInterval.h.
Definition at line 662 of file LiveInterval.h.
Definition at line 654 of file LiveInterval.h.
| typedef LiveRange llvm::LiveInterval::super |
Definition at line 590 of file LiveInterval.h.
|
inline |
Definition at line 619 of file LiveInterval.h.
|
inline |
Definition at line 622 of file LiveInterval.h.
References clearSubRanges().
| void LiveInterval::clearSubRanges | ( | ) |
Removes all subregister liveness information.
Definition at line 776 of file LiveInterval.cpp.
Referenced by llvm::ConnectedVNInfoEqClasses::Distribute(), and ~LiveInterval().
| void LiveInterval::constructMainRangeFromSubranges | ( | const SlotIndexes & | Indexes, |
| VNInfo::Allocator & | VNIAllocator | ||
| ) |
Construct main live range by merging the SubRanges of LI.
Definition at line 860 of file LiveInterval.cpp.
References llvm::LiveRange::append(), llvm::SmallVectorTemplateCommon< T, typename >::back(), determineMissingVNIs(), llvm::SmallVectorBase::empty(), llvm::LiveRange::empty(), llvm::LiveRange::Segment::end, llvm::LiveRange::end(), llvm::SlotIndexes::getMBBEndIdx(), llvm::SlotIndexes::getMBBFromIndex(), llvm::LiveRange::getNextValue(), llvm::LiveRange::getVNInfoBefore(), hasSubRanges(), I, llvm::SlotIndex::isBlock(), llvm::SlotIndex::isValid(), llvm::LiveInterval::SubRange::LaneMask, llvm::MachineBasicBlock::predecessors(), llvm::LiveRange::segments, llvm::LiveRange::Segment::start, subranges(), llvm::LiveRange::Segment::valno, llvm::LiveRange::valnos, and llvm::LiveRange::verify().
Referenced by llvm::LiveRangeCalc::calculate().
|
inline |
Creates a new empty subregister live range.
The range is added at the beginning of the subrange list; subrange iterators stay valid.
Definition at line 680 of file LiveInterval.h.
Referenced by llvm::LiveRangeCalc::calculate().
|
inline |
Like createSubRange() but the new range is filled with a copy of the liveness information in CopyFrom.
Definition at line 688 of file LiveInterval.h.
Referenced by llvm::LiveRangeCalc::calculate().
| void LiveInterval::dump | ( | ) | const |
Definition at line 1078 of file LiveInterval.cpp.
References llvm::dbgs().
| unsigned LiveInterval::getSize | ( | ) | const |
getSize - Returns the sum of sizes of all the LiveRange's.
Definition at line 1017 of file LiveInterval.cpp.
References llvm::LiveRange::segments.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().
|
inline |
Returns true if subregister liveness information is available.
Definition at line 696 of file LiveInterval.h.
Referenced by llvm::LiveRangeCalc::calculate(), constructMainRangeFromSubranges(), foreachUnit(), and llvm::LiveIntervals::HMEditor::updateAllRanges().
|
inline |
isSpillable - Can this interval be spilled?
Definition at line 716 of file LiveInterval.h.
References llvm::huge_valf, and weight.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().
|
inline |
markNotSpillable - Mark interval as not spillable
Definition at line 721 of file LiveInterval.h.
References llvm::huge_valf, and weight.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().
|
inline |
Definition at line 725 of file LiveInterval.h.
References llvm::LiveRange::beginIndex(), and reg.
| void LiveInterval::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1064 of file LiveInterval.cpp.
References llvm::format().
Referenced by llvm::operator<<().
| void LiveInterval::removeEmptySubRanges | ( | ) |
Removes all subranges without any segments (subranges without segments are not considered valid and should only exist temporarily).
Definition at line 757 of file LiveInterval.cpp.
References llvm::LiveRange::empty(), I, and llvm::LiveInterval::SubRange::Next.
Referenced by llvm::LiveRangeCalc::calculate(), and llvm::LiveIntervals::removeVRegDefAt().
|
inline |
Definition at line 655 of file LiveInterval.h.
Referenced by subranges().
|
inline |
Definition at line 663 of file LiveInterval.h.
|
inline |
Definition at line 658 of file LiveInterval.h.
Referenced by subranges().
|
inline |
Definition at line 666 of file LiveInterval.h.
|
inline |
Definition at line 670 of file LiveInterval.h.
References llvm::make_range(), subrange_begin(), and subrange_end().
Referenced by llvm::LiveIntervals::addKillFlags(), llvm::LiveRangeCalc::calculate(), constructMainRangeFromSubranges(), foreachUnit(), llvm::LiveIntervals::removeVRegDefAt(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::LiveIntervals::shrinkToUses(), and llvm::LiveIntervals::HMEditor::updateAllRanges().
|
inline |
Definition at line 674 of file LiveInterval.h.
References llvm::make_range(), subrange_begin(), and subrange_end().
| void LiveInterval::verify | ( | const MachineRegisterInfo * | MRI = nullptr | ) | const |
Walks the interval and assert if any invariants fail to hold.
Note that this is a no-op when asserts are disabled.
Definition at line 1100 of file LiveInterval.cpp.
References llvm::LiveRange::covers(), llvm::MachineRegisterInfo::getMaxLaneMaskForVReg(), and verify.
Definition at line 616 of file LiveInterval.h.
Referenced by llvm::RegAllocBase::allocatePhysRegs(), llvm::LiveRegMatrix::assign(), llvm::LiveRangeCalc::calculate(), llvm::LiveRangeEdit::calculateRegClassAndHint(), llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), llvm::LiveRegMatrix::checkRegMaskInterference(), llvm::LiveRegMatrix::checkRegUnitInterference(), llvm::ConnectedVNInfoEqClasses::Distribute(), llvm::LiveRangeEdit::eliminateDeadDefs(), llvm::LiveRangeEdit::getReg(), llvm::SplitAnalysis::isOriginalEndpoint(), operator<(), llvm::LiveIntervals::shrinkToUses(), and llvm::LiveRegMatrix::unassign().
| float llvm::LiveInterval::weight |
Definition at line 617 of file LiveInterval.h.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), isSpillable(), markNotSpillable(), and false::IntervalSorter::operator()().
1.8.6