14#ifndef LLVM_CODEGEN_DROPPEDVARIABLESTATS_H 
   15#define LLVM_CODEGEN_DROPPEDVARIABLESTATS_H 
   37    std::tuple<const DIScope *, const DIScope *, const DILocalVariable *>;
 
   88                                   VarID Var, 
unsigned &DroppedCount);
 
  124  bool isScopeChildOfOrEqualTo(
const DIScope *Scope,
 
  129  bool isInlinedAtChildOfOrEqualTo(
const DILocation *InlinedAt,
 
  132  bool PassDroppedVariables = 
false;
 
 
This file defines the DenseSet and SmallDenseSet classes.
 
This file defines the SmallVector class.
 
Base class for scope-like contexts.
 
Implements a dense probed hash-table based set.
 
DenseSet< const DIScope * > VisitedScope
A DenseSet tracking whether a scope was visited before.
 
LLVM_ABI void calculateDroppedStatsAndPrint(DebugVariables &DbgVariables, StringRef FuncName, 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...
 
virtual void visitEveryInstruction(unsigned &DroppedCount, DenseMap< VarID, DILocation * > &InlinedAtsMap, VarID Var)=0
Visit every llvm::Instruction or llvm::MachineInstruction and check if the debug variable denoted by ...
 
SmallVector< DenseMap< StringRef, DenseMap< VarID, DILocation * > > > InlinedAts
A stack of DenseMaps, which map the name of an llvm::Function to a DenseMap of VarIDs and their inlin...
 
LLVM_ABI bool updateDroppedCount(DILocation *DbgLoc, const DIScope *Scope, const DIScope *DbgValScope, DenseMap< VarID, DILocation * > &InlinedAtsMap, VarID Var, unsigned &DroppedCount)
Check if a Var has been dropped or is a false positive.
 
bool getPassDroppedVariables()
 
virtual void visitEveryDebugRecord(DenseSet< VarID > &VarIDSet, DenseMap< StringRef, DenseMap< VarID, DILocation * > > &InlinedAtsMap, StringRef FuncName, bool Before)=0
Visit every debug record in an llvm::Function or llvm::MachineFunction and call populateVarIDSetAndIn...
 
DroppedVariableStats(const DroppedVariableStats &)=delete
 
bool DroppedVariableStatsEnabled
 
LLVM_ABI void populateVarIDSetAndInlinedMap(const DILocalVariable *DbgVar, DebugLoc DbgLoc, DenseSet< VarID > &VarIDSet, DenseMap< StringRef, DenseMap< VarID, DILocation * > > &InlinedAtsMap, StringRef FuncName, bool Before)
Populate the VarIDSet and InlinedAtMap with the relevant information needed for before and after pass...
 
LLVM_ABI DroppedVariableStats(bool DroppedVarStatsEnabled)
 
SmallVector< DenseMap< const Function *, DebugVariables > > DebugVariablesStack
A stack of a DenseMap, that maps DebugVariables for every pass to an llvm::Function.
 
void operator=(const DroppedVariableStats &)=delete
 
LLVM_ABI void run(DebugVariables &DbgVariables, StringRef FuncName, bool Before)
Run code to populate relevant data structures over an llvm::Function or llvm::MachineFunction.
 
virtual ~DroppedVariableStats()=default
 
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
 
StringRef - Represent a constant reference to a string, i.e.
 
This is an optimization pass for GlobalISel generic memory operations.
 
std::tuple< const DIScope *, const DIScope *, const DILocalVariable * > VarID
A unique key that represents 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.