class LiveRangeUpdater
Declaration
class LiveRangeUpdater { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:927
Method Overview
- public LiveRangeUpdater(llvm::LiveRange * lr = nullptr)
- public void add(LiveRange::Segment)
- public void add(llvm::SlotIndex Start, llvm::SlotIndex End, llvm::VNInfo * VNI)
- public void dump() const
- public void flush()
- public llvm::LiveRange * getDest() const
- public bool isDirty() const
- public void print(llvm::raw_ostream &) const
- public void setDest(llvm::LiveRange * lr)
- public ~LiveRangeUpdater()
Methods
¶LiveRangeUpdater(llvm::LiveRange* lr = nullptr)
LiveRangeUpdater(llvm::LiveRange* lr = nullptr)
Description
Create a LiveRangeUpdater for adding segments to LR. LR will temporarily be in an invalid state until flush() is called.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:938
Parameters
- llvm::LiveRange* lr = nullptr
¶void add(LiveRange::Segment)
void add(LiveRange::Segment)
Description
Add a segment to LR and coalesce when possible, just like LR.addSegment(). Segments should be added in increasing start order for best performance.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:945
Parameters
¶void add(llvm::SlotIndex Start,
llvm::SlotIndex End,
llvm::VNInfo* VNI)
void add(llvm::SlotIndex Start,
llvm::SlotIndex End,
llvm::VNInfo* VNI)
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:947
Parameters
- llvm::SlotIndex Start
- llvm::SlotIndex End
- llvm::VNInfo* VNI
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:969
¶void flush()
void flush()
Description
Flush the updater state to LR so it is valid and contains all added segments.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:957
¶llvm::LiveRange* getDest() const
llvm::LiveRange* getDest() const
Description
Get the current destination live range.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:967
¶bool isDirty() const
bool isDirty() const
Description
Return true if the LR is currently in an invalid state, and flush() needs to be called.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:953
¶void print(llvm::raw_ostream&) const
void print(llvm::raw_ostream&) const
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:970
Parameters
¶void setDest(llvm::LiveRange* lr)
void setDest(llvm::LiveRange* lr)
Description
Select a different destination live range.
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:960
Parameters
- llvm::LiveRange* lr
¶~LiveRangeUpdater()
~LiveRangeUpdater()
Declared at: llvm/include/llvm/CodeGen/LiveInterval.h:940