14#ifndef LLVM_CODEGEN_DROPPEDVARIABLESTATS_H
15#define LLVM_CODEGEN_DROPPEDVARIABLESTATS_H
74 unsigned &DroppedCount);
100 static bool isScopeChildOfOrEqualTo(
const DIScope *Scope,
107 bool PassDroppedVariables =
false;
This file defines the DenseSet and SmallDenseSet classes.
This file defines the SmallVector class.
Base class for scope-like contexts.
Identifies a unique instance of a whole variable (discards/ignores fragment information).
Implements a dense probed hash-table based set.
LLVM_ABI void populateVarIDSet(const DILocalVariable *DbgVar, DebugLoc DbgLoc, DenseSet< VarID > &VarIDSet)
Add the VarID of the debug record of DbgVar at DbgLoc to VarIDSet.
virtual void visitEveryInstruction(unsigned &DroppedCount, VarID Var)=0
Visit every llvm::Instruction or llvm::MachineInstruction and check if the debug variable denoted by ...
bool getPassDroppedVariables()
virtual void visitEveryDebugRecord(DenseSet< VarID > &VarIDSet)=0
Visit every debug record in an llvm::Function or llvm::MachineFunction and call populateVarIDSet on i...
DroppedVariableStats(const DroppedVariableStats &)=delete
bool DroppedVariableStatsEnabled
LLVM_ABI void run(DebugVariables &DbgVariables, bool Before)
Run code to populate relevant data structures over an llvm::Function or llvm::MachineFunction.
LLVM_ABI DroppedVariableStats(bool DroppedVarStatsEnabled)
LLVM_ABI void calculateDroppedStatsAndPrint(DebugVariables &DbgVariables, StringRef PassID, StringRef FuncOrModName, StringRef PassLevel, const Function *Func)
Calculate the number of dropped variables in an llvm::Function or llvm::MachineFunction and print the...
SmallVector< DenseMap< const Function *, DebugVariables > > DebugVariablesStack
A stack of a DenseMap, that maps DebugVariables for every pass to an llvm::Function.
LLVM_ABI bool updateDroppedCount(const DILocation *DbgLoc, VarID Var, unsigned &DroppedCount)
Check if a Var has been dropped or is a false positive.
void operator=(const DroppedVariableStats &)=delete
virtual ~DroppedVariableStats()=default
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
DebugVariableAggregate VarID
A unique key that represents one instance of a debug variable.
DenseSet< VarID > DebugVariablesAfter
DenseSet of VarIDs after an optimization pass has run.
DenseSet< VarID > DebugVariablesBefore
DenseSet of VarIDs before an optimization pass has run.