LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::LiveInterval Class Reference

#include <LiveInterval.h>

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

Public Types

typedef LiveRange super
 
- Public Types inherited from llvm::LiveRange
typedef SmallVector< Segment, 4 > Segments
 
typedef SmallVector< VNInfo *, 4 > VNInfoList
 
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)
 
unsigned getSize () const
 
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
 
- 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 advanceTo (iterator I, SlotIndex Pos)
 
iterator find (SlotIndex Pos)
 
const_iterator find (SlotIndex Pos) const
 
void clear ()
 
size_t size () const
 
bool hasAtLeastOneValue () const
 
bool containsOneValue () const
 
unsigned getNumValNums () const
 
VNInfogetValNumInfo (unsigned ValNo)
 
const VNInfogetValNumInfo (unsigned ValNo) const
 
bool containsValue (const VNInfo *VNI) const
 containsValue - Returns true if VNI belongs to this range. More...
 
VNInfogetNextValue (SlotIndex def, VNInfo::Allocator &VNInfoAllocator)
 
VNInfocreateDeadDef (SlotIndex Def, VNInfo::Allocator &VNInfoAllocator)
 
VNInfocreateValueCopy (const VNInfo *orig, VNInfo::Allocator &VNInfoAllocator)
 
void RenumberValues ()
 
VNInfoMergeValueNumberInto (VNInfo *V1, VNInfo *V2)
 
void MergeSegmentsInAsValue (const LiveRange &RHS, VNInfo *LHSValNo)
 
void MergeValueInAsValue (const LiveRange &RHS, const VNInfo *RHSValNo, VNInfo *LHSValNo)
 
bool empty () const
 
SlotIndex beginIndex () const
 beginIndex - Return the lowest numbered slot covered. More...
 
SlotIndex endIndex () const
 
bool expiredAt (SlotIndex index) const
 
bool liveAt (SlotIndex index) const
 
const SegmentgetSegmentContaining (SlotIndex Idx) const
 
SegmentgetSegmentContaining (SlotIndex Idx)
 
VNInfogetVNInfoAt (SlotIndex Idx) const
 getVNInfoAt - Return the VNInfo that is live at Idx, or NULL. More...
 
VNInfogetVNInfoBefore (SlotIndex Idx) const
 
iterator FindSegmentContaining (SlotIndex Idx)
 
const_iterator FindSegmentContaining (SlotIndex Idx) const
 
bool overlaps (const LiveRange &other) const
 
bool overlaps (const LiveRange &Other, const CoalescerPair &CP, const SlotIndexes &) const
 
bool overlaps (SlotIndex Start, SlotIndex End) const
 
bool overlapsFrom (const LiveRange &Other, const_iterator I) const
 
iterator addSegment (Segment S)
 
VNInfoextendInBlock (SlotIndex StartIdx, SlotIndex Kill)
 
void join (LiveRange &Other, const int *ValNoAssignments, const int *RHSValNoAssignments, SmallVectorImpl< VNInfo * > &NewVNInfo)
 
bool isLocal (SlotIndex Start, SlotIndex End) const
 
void removeSegment (SlotIndex Start, SlotIndex End, bool RemoveDeadValNo=false)
 
void removeSegment (Segment S, bool RemoveDeadValNo=false)
 
LiveQueryResult Query (SlotIndex Idx) const
 
void removeValNo (VNInfo *ValNo)
 
bool isZeroLength (SlotIndexes *Indexes) const
 
bool operator< (const LiveRange &other) const
 
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
 

Detailed Description

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

Definition at line 528 of file LiveInterval.h.

Member Typedef Documentation

Definition at line 530 of file LiveInterval.h.

Constructor & Destructor Documentation

llvm::LiveInterval::LiveInterval ( unsigned  Reg,
float  Weight 
)
inline

Definition at line 535 of file LiveInterval.h.

Member Function Documentation

void LiveInterval::dump ( ) const

Definition at line 630 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 573 of file LiveInterval.cpp.

References llvm::LiveRange::begin(), llvm::LiveRange::end(), and I.

Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().

bool llvm::LiveInterval::isSpillable ( ) const
inline

isSpillable - Can this interval be spilled?

Definition at line 543 of file LiveInterval.h.

References llvm::huge_valf, and weight.

Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().

void llvm::LiveInterval::markNotSpillable ( )
inline

markNotSpillable - Mark interval as not spillable

Definition at line 548 of file LiveInterval.h.

References llvm::huge_valf, and weight.

Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().

bool llvm::LiveInterval::operator< ( const LiveInterval other) const
inline

Definition at line 552 of file LiveInterval.h.

References llvm::LiveRange::beginIndex(), and reg.

void LiveInterval::print ( raw_ostream OS) const

Definition at line 620 of file LiveInterval.cpp.

Referenced by llvm::operator<<().

Member Data Documentation

const unsigned llvm::LiveInterval::reg
float llvm::LiveInterval::weight

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