[#llvm-StackLifetime] = xref:llvm.adoc[llvm]::StackLifetime :relfileprefix: ../ :mrdocs: Compute live ranges of allocas. == Synopsis Declared in `<llvm/Analysis/StackLifetime.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class StackLifetime; ---- == Description Live ranges are represented as sets of "interesting" instructions, which are defined as instructions that may start or end an alloca's lifetime. These are: * lifetime.start and lifetime.end intrinsics * first instruction of any basic block Interesting instructions are numbered in the depth‐first walk of the CFG, and in the program order inside each basic block. == Types [cols="1,4"] |=== | Name| Description | xref:llvm/StackLifetime/LifetimeAnnotationWriter.adoc[`LifetimeAnnotationWriter`] | Writes per‐instruction alive‐alloca annotations when printing a function. | xref:llvm/StackLifetime/LiveRange.adoc[`LiveRange`] | This class represents a set of interesting instructions where an alloca is live. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/StackLifetime/LivenessType.adoc[`LivenessType`] | Controls what is "alive" if control flow may reach the instruction with a different liveness of the alloca. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/StackLifetime/2constructor.adoc[`StackLifetime`] [.small]#[constructor]# | Construct analysis for `Allocas` in `F` under liveness mode `Type.` | xref:llvm/StackLifetime/getFullLiveRange.adoc[`getFullLiveRange`] | Returns a live range that represents an alloca that is live throughout the entire function. | xref:llvm/StackLifetime/getLiveRange.adoc[`getLiveRange`] | Return the live range of interesting instructions for `AI.` | xref:llvm/StackLifetime/getMarkers.adoc[`getMarkers`] | Return the interesting lifetime.start / lifetime.end markers. | xref:llvm/StackLifetime/isAliveAfter.adoc[`isAliveAfter`] | Returns true if the alloca is alive after the instruction. | xref:llvm/StackLifetime/isReachable.adoc[`isReachable`] | Returns true if instruction is reachable from entry. | xref:llvm/StackLifetime/print.adoc[`print`] | Print the function with alive‐alloca annotations to `O.` | xref:llvm/StackLifetime/run.adoc[`run`] | Compute live ranges for the configured allocas. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#