LLVM: llvm::LiveRangeUpdater Class Reference (original) (raw)

Helper class for performant LiveRange bulk updates. More...

#include "[llvm/CodeGen/LiveInterval.h](LiveInterval%5F8h%5Fsource.html)"

Public Member Functions
LiveRangeUpdater (LiveRange *lr=nullptr)
Create a LiveRangeUpdater for adding segments to LR.
~LiveRangeUpdater ()
LLVM_ABI void add (LiveRange::Segment)
Add a segment to LR and coalesce when possible, just like LR.addSegment().
void add (SlotIndex Start, SlotIndex End, VNInfo *VNI)
bool isDirty () const
Return true if the LR is currently in an invalid state, and flush() needs to be called.
LLVM_ABI void flush ()
Flush the updater state to LR so it is valid and contains all added segments.
void setDest (LiveRange *lr)
Select a different destination live range.
LiveRange * getDest () const
Get the current destination live range.
LLVM_ABI void dump () const
LLVM_ABI void print (raw_ostream &) const

Helper class for performant LiveRange bulk updates.

Calling LiveRange::addSegment() repeatedly can be expensive on large live ranges because segments after the insertion point may need to be shifted. The LiveRangeUpdater class can defer the shifting when adding many segments in order.

The LiveRange will be in an invalid state until flush() is called.

Definition at line 955 of file LiveInterval.h.

llvm::LiveRangeUpdater::LiveRangeUpdater ( LiveRange * lr = nullptr) inline

~LiveRangeUpdater()

llvm::LiveRangeUpdater::~LiveRangeUpdater ( ) inline

add() [1/2]

Add a segment to LR and coalesce when possible, just like LR.addSegment().

Segments should be added in increasing start order for best performance.

Definition at line 1196 of file LiveInterval.cpp.

References assert(), coalescable(), llvm::LiveRange::end(), llvm::LiveRange::Segment::end, flush(), isDirty(), llvm::LiveRange::Segment::start, and llvm::LiveRange::Segment::valno.

Referenced by add(), llvm::LiveRange::join(), llvm::LiveRange::MergeSegmentsInAsValue(), and llvm::LiveRange::MergeValueInAsValue().

add() [2/2]

dump()

flush()

void LiveRangeUpdater::flush ( )

getDest()

LiveRange * llvm::LiveRangeUpdater::getDest ( ) const inline

Get the current destination live range.

Definition at line 995 of file LiveInterval.h.

isDirty()

bool llvm::LiveRangeUpdater::isDirty ( ) const inline

print()

setDest()

void llvm::LiveRangeUpdater::setDest ( LiveRange * lr) inline

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