LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::LiveInterval::SubRange Class Reference

A live range for subregisters. More...

#include "llvm/CodeGen/LiveInterval.h"

Inheritance diagram for llvm::LiveInterval::SubRange:
Inheritance graph
[legend]

Public Member Functions

 SubRange (LaneBitmask LaneMask)
 Constructs a new SubRange object.
 
 SubRange (LaneBitmask LaneMask, const LiveRange &Other, BumpPtrAllocator &Allocator)
 Constructs a new SubRange object by copying liveness from Other.
 
void print (raw_ostream &OS) const
 
void dump () const
 
- 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
 
iterator_range< vni_iteratorvnis ()
 
iterator_range< const_vni_iteratorvnis () const
 
 LiveRange (bool UseSegmentSet=false)
 Constructs a new LiveRange object.
 
 LiveRange (const LiveRange &Other, BumpPtrAllocator &Allocator)
 Constructs a new LiveRange object by copying segments and valnos from another LiveRange.
 
void assign (const LiveRange &Other, BumpPtrAllocator &Allocator)
 Copies values numbers and live segments from Other into this range.
 
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.
 
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().
 
const_iterator find (SlotIndex Pos) const
 
void clear ()
 
size_t size () const
 
bool hasAtLeastOneValue () const
 
bool containsOneValue () const
 
unsigned getNumValNums () const
 
VNInfogetValNumInfo (unsigned ValNo)
 getValNumInfo - Returns pointer to the specified val#.
 
const VNInfogetValNumInfo (unsigned ValNo) const
 
bool containsValue (const VNInfo *VNI) const
 containsValue - Returns true if VNI belongs to this range.
 
VNInfogetNextValue (SlotIndex Def, VNInfo::Allocator &VNInfoAllocator)
 getNextValue - Create a new value number and return it.
 
VNInfocreateDeadDef (SlotIndex Def, VNInfo::Allocator &VNIAlloc)
 createDeadDef - Make sure the range has a value defined at Def.
 
VNInfocreateDeadDef (VNInfo *VNI)
 Create a def of value VNI.
 
VNInfocreateValueCopy (const VNInfo *orig, VNInfo::Allocator &VNInfoAllocator)
 Create a copy of the given value.
 
void RenumberValues ()
 RenumberValues - Renumber all values in order of appearance and remove unused values.
 
VNInfoMergeValueNumberInto (VNInfo *V1, VNInfo *V2)
 MergeValueNumberInto - This method is called when two value numbers are found to be equivalent.
 
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.
 
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.
 
bool empty () const
 
SlotIndex beginIndex () const
 beginIndex - Return the lowest numbered slot covered.
 
SlotIndex endIndex () const
 endNumber - return the maximum point of the range of the whole, exclusive.
 
bool expiredAt (SlotIndex index) const
 
bool liveAt (SlotIndex index) const
 
const SegmentgetSegmentContaining (SlotIndex Idx) const
 Return the segment that contains the specified index, or null if there is none.
 
SegmentgetSegmentContaining (SlotIndex Idx)
 Return the live segment that contains the specified index, or null if there is none.
 
VNInfogetVNInfoAt (SlotIndex Idx) const
 getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.
 
VNInfogetVNInfoBefore (SlotIndex Idx) const
 getVNInfoBefore - Return the VNInfo that is live up to but not necessarilly including Idx, or NULL.
 
iterator FindSegmentContaining (SlotIndex Idx)
 Return an iterator to the segment that contains the specified index, or end() if there is none.
 
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.
 
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.
 
bool overlaps (SlotIndex Start, SlotIndex End) const
 overlaps - Return true if the live range overlaps an interval specified by [Start, End).
 
bool overlapsFrom (const LiveRange &Other, const_iterator StartPos) const
 overlapsFrom - Return true if the intersection of the two live ranges is not empty.
 
bool covers (const LiveRange &Other) const
 Returns true if all segments of the Other live range are completely covered by this live range.
 
iterator addSegment (Segment S)
 Add the specified Segment to this range, merging segments as appropriate.
 
std::pair< VNInfo *, boolextendInBlock (ArrayRef< SlotIndex > Undefs, SlotIndex StartIdx, SlotIndex Kill)
 Attempt to extend a value defined after StartIdx to include Use.
 
VNInfoextendInBlock (SlotIndex StartIdx, SlotIndex Kill)
 Simplified version of the above "extendInBlock", which assumes that no register lanes are undefined by <def,read-undef> operands.
 
void join (LiveRange &Other, const int *ValNoAssignments, const int *RHSValNoAssignments, SmallVectorImpl< VNInfo * > &NewVNInfo)
 join - Join two live ranges (this, and other) together.
 
bool isLocal (SlotIndex Start, SlotIndex End) const
 True iff this segment is a single segment that lies between the specified boundaries, exclusively.
 
void removeSegment (SlotIndex Start, SlotIndex End, bool RemoveDeadValNo=false)
 Remove the specified interval from this live range.
 
void removeSegment (Segment S, bool RemoveDeadValNo=false)
 
iterator removeSegment (iterator I, bool RemoveDeadValNo=false)
 Remove segment pointed to by iterator I from this range.
 
void removeValNoIfDead (VNInfo *ValNo)
 Mark ValNo for deletion if no segments in this range use it.
 
LiveQueryResult Query (SlotIndex Idx) const
 Query Liveness at Idx.
 
void removeValNo (VNInfo *ValNo)
 removeValNo - Remove all the segments defined by the specified value#.
 
bool isZeroLength (SlotIndexes *Indexes) const
 Returns true if the live range is zero length, i.e.
 
bool isLiveAtIndexes (ArrayRef< SlotIndex > Slots) const
 
bool operator< (const LiveRange &other) const
 
bool isUndefIn (ArrayRef< SlotIndex > Undefs, SlotIndex Begin, SlotIndex End) const
 Returns true if there is an explicit "undef" between Begin End.
 
void flushSegmentSet ()
 Flush segment set into the regular segment vector.
 
template<typename Range , typename OutputIt >
bool findIndexesLiveAt (Range &&R, OutputIt O) const
 Stores indexes from the input index sequence R at which this LiveRange is live to the output O iterator.
 
void print (raw_ostream &OS) const
 
void dump () const
 
void verify () const
 Walk the range and assert if any invariants fail to hold.
 

Public Attributes

SubRangeNext = nullptr
 
LaneBitmask LaneMask
 
- Public Attributes inherited from llvm::LiveRange
Segments segments
 
VNInfoList valnos
 
std::unique_ptr< SegmentSetsegmentSet
 

Additional Inherited Members

- Public Types inherited from llvm::LiveRange
using Segments = SmallVector< Segment, 2 >
 
using VNInfoList = SmallVector< VNInfo *, 2 >
 
using SegmentSet = std::set< Segment >
 
using iterator = Segments::iterator
 
using const_iterator = Segments::const_iterator
 
using vni_iterator = VNInfoList::iterator
 
using const_vni_iterator = VNInfoList::const_iterator
 
- Protected Member Functions inherited from llvm::LiveRange
void append (const LiveRange::Segment S)
 Append a segment to the list of segments.
 

Detailed Description

A live range for subregisters.

The LaneMask specifies which parts of the super register are covered by the interval. (

See also
TargetRegisterInfo::getSubRegIndexLaneMask()).

Definition at line 694 of file LiveInterval.h.

Constructor & Destructor Documentation

◆ SubRange() [1/2]

llvm::LiveInterval::SubRange::SubRange ( LaneBitmask  LaneMask)
inline

Constructs a new SubRange object.

Definition at line 700 of file LiveInterval.h.

◆ SubRange() [2/2]

llvm::LiveInterval::SubRange::SubRange ( LaneBitmask  LaneMask,
const LiveRange Other,
BumpPtrAllocator Allocator 
)
inline

Constructs a new SubRange object by copying liveness from Other.

Definition at line 703 of file LiveInterval.h.

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void LiveInterval::SubRange::dump ( ) const

Definition at line 1048 of file LiveInterval.cpp.

References llvm::dbgs().

◆ print()

void LiveInterval::SubRange::print ( raw_ostream OS) const

Definition at line 1029 of file LiveInterval.cpp.

References OS, and llvm::PrintLaneMask().

Referenced by llvm::operator<<().

Member Data Documentation

◆ LaneMask

LaneBitmask llvm::LiveInterval::SubRange::LaneMask

◆ Next

SubRange* llvm::LiveInterval::SubRange::Next = nullptr

Definition at line 696 of file LiveInterval.h.


The documentation for this class was generated from the following files: