LLVM 17.0.0git
Public Member Functions | List of all members
FunctionVarLocsBuilder Class Reference

Helper class to build FunctionVarLocs, since that class isn't easy to modify. More...

Public Member Functions

unsigned getNumVariables () const
 
VariableID insertVariable (DebugVariable V)
 Find or insert V and return the ID.
 
const DebugVariablegetVariable (VariableID ID) const
 Get a variable from its ID.
 
const SmallVectorImpl< VarLocInfo > * getWedge (const Instruction *Before) const
 Return ptr to wedge of defs or nullptr if no defs come just before /p Before.
 
void setWedge (const Instruction *Before, SmallVector< VarLocInfo > &&Wedge)
 Replace the defs that come just before /p Before with /p Wedge.
 
void addSingleLocVar (DebugVariable Var, DIExpression *Expr, DebugLoc DL, RawLocationWrapper R)
 Add a def for a variable that is valid for its lifetime.
 
void addVarLoc (Instruction *Before, DebugVariable Var, DIExpression *Expr, DebugLoc DL, RawLocationWrapper R)
 Add a def to the wedge of defs just before /p Before.
 

Detailed Description

Helper class to build FunctionVarLocs, since that class isn't easy to modify.

TODO: There's not a great deal of value in the split, it could be worth merging the two classes.

Definition at line 79 of file AssignmentTrackingAnalysis.cpp.

Member Function Documentation

◆ addSingleLocVar()

void FunctionVarLocsBuilder::addSingleLocVar ( DebugVariable  Var,
DIExpression Expr,
DebugLoc  DL,
RawLocationWrapper  R 
)
inline

◆ addVarLoc()

void FunctionVarLocsBuilder::addVarLoc ( Instruction Before,
DebugVariable  Var,
DIExpression Expr,
DebugLoc  DL,
RawLocationWrapper  R 
)
inline

Add a def to the wedge of defs just before /p Before.

Definition at line 128 of file AssignmentTrackingAnalysis.cpp.

References llvm::VarLocInfo::DL, DL, llvm::VarLocInfo::Expr, insertVariable(), llvm::VarLocInfo::Values, and llvm::VarLocInfo::VariableID.

◆ getNumVariables()

unsigned FunctionVarLocsBuilder::getNumVariables ( ) const
inline

◆ getVariable()

const DebugVariable & FunctionVarLocsBuilder::getVariable ( VariableID  ID) const
inline

◆ getWedge()

const SmallVectorImpl< VarLocInfo > * FunctionVarLocsBuilder::getWedge ( const Instruction Before) const
inline

Return ptr to wedge of defs or nullptr if no defs come just before /p Before.

Definition at line 104 of file AssignmentTrackingAnalysis.cpp.

Referenced by removeRedundantDbgLocsUsingBackwardScan(), removeRedundantDbgLocsUsingForwardScan(), and removeUndefDbgLocsFromEntryBlock().

◆ insertVariable()

VariableID FunctionVarLocsBuilder::insertVariable ( DebugVariable  V)
inline

Find or insert V and return the ID.

Definition at line 93 of file AssignmentTrackingAnalysis.cpp.

References llvm::UniqueVector< T >::insert().

Referenced by addSingleLocVar(), addVarLoc(), and buildOverlapMapAndRecordDeclares().

◆ setWedge()

void FunctionVarLocsBuilder::setWedge ( const Instruction Before,
SmallVector< VarLocInfo > &&  Wedge 
)
inline

Replace the defs that come just before /p Before with /p Wedge.

Definition at line 112 of file AssignmentTrackingAnalysis.cpp.

Referenced by removeRedundantDbgLocsUsingBackwardScan(), removeRedundantDbgLocsUsingForwardScan(), and removeUndefDbgLocsFromEntryBlock().


The documentation for this class was generated from the following file: