llvm::DroppedVariableStats

A base class to collect and print dropped debug information variable statistics.

Synopsis

Declared in <llvm/IR/DroppedVariableStats.h>

class DroppedVariableStats;

Member Functions

NameDescription
DroppedVariableStats [constructor]Constructors
~DroppedVariableStats [destructor] [virtual]Destroy a DroppedVariableStats tracker.
operator= [deleted]Copy assignment is deleted; this class is unique per compilation.
getPassDroppedVariables Return true if the most recent pass dropped any debug variables.

Protected Types

NameDescription
DebugVariables Per-function debug variable sets recorded before and after a pass.

Protected Member Functions

NameDescription
calculateDroppedStatsAndPrint Calculate the number of dropped variables in an llvm::Function or llvm::MachineFunction and print the relevant information to stdout.
cleanup Pop the most recent level from the per-pass tracking stacks.
populateVarIDSetAndInlinedMap Populate the VarIDSet and InlinedAtMap with the relevant information needed for before and after pass analysis to determine dropped variable status.
run Run code to populate relevant data structures over an llvm::Function or llvm::MachineFunction.
setup Push a new empty level onto the per-pass tracking stacks.
updateDroppedCount Check if a Var has been dropped or is a false positive. Also update the DroppedCount if a debug variable is dropped.
visitEveryDebugRecord [virtual]Visit every debug record in an llvm::Function or llvm::MachineFunction and call populateVarIDSetAndInlinedMap on it.
visitEveryInstruction [virtual]Visit every llvm::Instruction or llvm::MachineInstruction and check if the debug variable denoted by its ID Var may have been dropped by an optimization pass.

Protected Data Members

NameDescription
DebugVariablesStack A stack of a DenseMap, that maps DebugVariables for every pass to an llvm::Function. A stack is used because an optimization pass can call other passes.
DroppedVariableStatsEnabled True when dropped-variable statistics collection is enabled.
InlinedAts A stack of DenseMaps, which map the name of an llvm::Function to a DenseMap of VarIDs and their inlinedAt locations before an optimization pass has run.
VisitedScope A DenseSet tracking whether a scope was visited before.

Derived Classes

NameDescription
DroppedVariableStatsIR Collects and prints debug values dropped by LLVM IR optimization passes.
DroppedVariableStatsMIR A class to collect and print dropped debug information due to MIR optimization passes.