[#llvm-LiveRangeUpdater] = xref:llvm.adoc[llvm]::LiveRangeUpdater :relfileprefix: ../ :mrdocs: Helper class for performant LiveRange bulk updates. == Synopsis Declared in `<llvm/CodeGen/LiveInterval.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class LiveRangeUpdater; ---- == Description 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. == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/LiveRangeUpdater/2constructor.adoc[`LiveRangeUpdater`] [.small]#[constructor]# | Create a LiveRangeUpdater for adding segments to `lr.` | xref:llvm/LiveRangeUpdater/2destructor.adoc[`~LiveRangeUpdater`] [.small]#[destructor]# | Flush any pending updates on destruction. | xref:llvm/LiveRangeUpdater/add-0b6.adoc[`add`] | `add` overloads | xref:llvm/LiveRangeUpdater/dump.adoc[`dump`] | Dump the updater state to the debug stream. | xref:llvm/LiveRangeUpdater/flush.adoc[`flush`] | Flush the updater state to LR so it is valid and contains all added segments. | xref:llvm/LiveRangeUpdater/getDest.adoc[`getDest`] | Get the current destination live range. | xref:llvm/LiveRangeUpdater/isDirty.adoc[`isDirty`] | Return true if the LR is currently in an invalid state, and flush() needs to be called. | xref:llvm/LiveRangeUpdater/print.adoc[`print`] | Print the updater state to `OS.` | xref:llvm/LiveRangeUpdater/setDest.adoc[`setDest`] | Select a different destination live range. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#