LiveInterval ‐ This class represents the liveness of a register, or stack slot.

Synopsis

Declared in <llvm/CodeGen/LiveInterval.h>

class LiveInterval
    : public LiveRange

Base Classes

Name

Description

LiveRange

This class represents the liveness of a register, stack slot, etc. It manages an ordered list of Segment objects. The Segments are organized in a static single assignment form: At places where a new value is defined or different values reach a CFG join a new segment with a new value number is used.

Types

Name

Description

Segment

This represents a simple continuous liveness interval for a value. The start point is inclusive, the end point exclusive. These intervals are rendered as [start,end).]

SingleLinkedListIterator

SubRange

A live range for subregisters. The LaneMask specifies which parts of the super register are covered by the interval. (

Type Aliases

Member Functions

Name

Description

LiveInterval [constructor]

~LiveInterval [destructor]

Destructor

FindSegmentContaining

Return an iterator to the segment that contains the specified index, or end() if there is none.

MergeSegmentsInAsValue

Merge all of the live segments of a specific val# in RHS into this live range as the specified value number. The segments in RHS are allowed to overlap with segments in the current range, it will replace the value numbers of the overlaped live segments with the specified value number.

MergeValueInAsValue

MergeValueInAsValue ‐ Merge all of the segments of a specific val# in RHS into this live range as the specified value number. The segments in RHS are allowed to overlap with segments in the current range, but only if the overlapping segments have the specified value number.

MergeValueNumberInto

MergeValueNumberInto ‐ This method is called when two value numbers are found to be equivalent. This eliminates V1, replacing all segments with the V1 value number with the V2 value number. This can cause merging of V1/V2 values numbers and compaction of the value space.

Query

Query Liveness at Idx. The sub‐instruction slot of Idx doesn't matter, only the instruction it refers to is considered.

RenumberValues

RenumberValues ‐ Renumber all values in order of appearance and remove unused values.

addSegment

Add the specified Segment to this range, merging segments as appropriate. This returns an iterator to the inserted segment (which may have grown since it was inserted).

advanceTo

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. If no Segment contains this position, but the position is in a hole, this method returns an iterator pointing to the Segment immediately after the hole.

assign

Copies values numbers and live segments from Other into this range.

begin

beginIndex

beginIndex ‐ Return the lowest numbered slot covered.

clear

clearSubRanges

Removes all subregister liveness information.

computeSubRangeUndefs

For a given lane mask LaneMask, compute indexes at which the lane is marked undefined by subregister <def,read‐undef> definitions.

containsOneValue

containsValue

containsValue ‐ Returns true if VNI belongs to this range.

covers

Returns true if all segments of the Other live range are completely covered by this live range. Adjacent live ranges do not affect the covering:the liverange [1,5]covers (3,7].

createDeadDef

createDeadDef overloads

createSubRange

Creates a new empty subregister live range. The range is added at the beginning of the subrange list; subrange iterators stay valid.

createSubRangeFrom

Like createSubRange() but the new range is filled with a copy of the liveness information in CopyFrom.

createValueCopy

Create a copy of the given value. The new value will be identical except for the Value number.

dump

empty

end

endIndex

endNumber ‐ return the maximum point of the range of the whole, exclusive.

expiredAt

extendInBlock

extendInBlock overloads

find

find ‐ Return an iterator pointing to the first segment that ends after Pos, or end(). This is the same as advanceTo(begin(), Pos), but faster when searching large ranges.

findIndexesLiveAt

Stores indexes from the input index sequence R at which this LiveRange is live to the output O iterator. R is a range of ascending sorted random access iterators to the input indexes. Indexes stored at O are ascending sorted so it can be used directly in the subsequent search (for example for subranges). Returns true if found at least one index.

flushSegmentSet

Flush segment set into the regular segment vector. The method is to be called after the live range has been created, if use of the segment set was activated in the constructor of the live range.

getNextValue

getNextValue ‐ Create a new value number and return it. Def is the index of instruction that defines the value number.

getNumValNums

getSegmentContaining

getSegmentContaining overloads

getSize

getSize ‐ Returns the sum of sizes of all the LiveRange's.

getVNInfoAt

getVNInfoAt ‐ Return the VNInfo that is live at Idx, or NULL.

getVNInfoBefore

getVNInfoBefore ‐ Return the VNInfo that is live up to but not necessarily including Idx, or NULL. Use this to find the reaching def used by an instruction at this SlotIndex position.

getValNumInfo

getValNumInfo ‐ Returns pointer to the specified val#.

hasAtLeastOneValue

hasSubRanges

Returns true if subregister liveness information is available.

incrementWeight

isLiveAtIndexes

isLocal

True iff this segment is a single segment that lies between the specified boundaries, exclusively. Vregs live across a backedge are not considered local. The boundaries are expected to lie within an extended basic block, so vregs that are not live out should contain no holes.

isSpillable

isSpillable ‐ Can this interval be spilled?

isUndefIn

Returns true if there is an explicit "undef" between Begin End.

isZeroLength

Returns true if the live range is zero length, i.e. no live segments span instructions. It doesn't pay to spill such a range.

join

join ‐ Join two live ranges (this, and other) together. This applies mappings to the value numbers in the LHS/RHS ranges as specified. If the ranges are not joinable, this aborts.

liveAt

markNotSpillable

markNotSpillable ‐ Mark interval as not spillable

mergeAdjacentSegments

Merge the segment pointed to by I with its immediate neighbors when they use the same value number and touch it. I must be a valid iterator into this live range. Returns an iterator to the merged segment, which may be I or the previous segment if I was merged into it.

overlaps

overlaps overloads

overlapsFrom

overlapsFrom ‐ Return true if the intersection of the two live ranges is not empty. The specified iterator is a hint that we can begin scanning the Other range starting at I.

print

refineSubRanges

Refines the subranges to support LaneMask. This may only be called for LI.hasSubrange()==true. Subregister ranges are split or created until LaneMask can be matched exactly. Mod is executed on the matching subranges.

reg

removeEmptySubRanges

Removes all subranges without any segments (subranges without segments are not considered valid and should only exist temporarily).

removeSegment

removeSegment overloads

removeValNo

removeValNo ‐ Remove all the segments defined by the specified value#. Also remove the value# from value# list.

removeValNoIfDead

Mark ValNo for deletion if no segments in this range use it.

setWeight

size

subrange_begin

subrange_end

subranges

verify

vni_begin

vni_end

vnis

weight

operator<

Less‐than operators

Data Members

Protected Member Functions

Name

Description

append

Append a segment to the list of segments.

Created with MrDocs