Compute live ranges of allocas.

Synopsis

Declared in <llvm/Analysis/StackLifetime.h>

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

Name

Description

LifetimeAnnotationWriter

Writes per‐instruction alive‐alloca annotations when printing a function.

LiveRange

This class represents a set of interesting instructions where an alloca is live.

Enums

Name

Description

LivenessType

Controls what is "alive" if control flow may reach the instruction with a different liveness of the alloca.

Member Functions

Name

Description

StackLifetime [constructor]

Construct analysis for Allocas in F under liveness mode Type.

getFullLiveRange

Returns a live range that represents an alloca that is live throughout the entire function.

getLiveRange

Return the live range of interesting instructions for AI.

getMarkers

Return the interesting lifetime.start / lifetime.end markers.

isAliveAfter

Returns true if the alloca is alive after the instruction.

isReachable

Returns true if instruction is reachable from entry.

print

Print the function with alive‐alloca annotations to O.

run

Compute live ranges for the configured allocas.

Created with MrDocs