LLVM 20.0.0git
|
LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction. More...
#include "llvm/CodeGen/LexicalScopes.h"
Public Member Functions | |
LexicalScopes ()=default | |
void | initialize (const MachineFunction &) |
initialize - Scan machine function and constuct lexical scope nest, resets the instance if necessary. | |
void | reset () |
releaseMemory - release memory. | |
bool | empty () |
empty - Return true if there is any lexical scope information available. | |
LexicalScope * | getCurrentFunctionScope () const |
getCurrentFunctionScope - Return lexical scope for the current function. | |
void | getMachineBasicBlocks (const DILocation *DL, SmallPtrSetImpl< const MachineBasicBlock * > &MBBs) |
getMachineBasicBlocks - Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc. | |
bool | dominates (const DILocation *DL, MachineBasicBlock *MBB) |
Return true if DebugLoc's lexical scope dominates at least one machine instruction's lexical scope in a given machine basic block. | |
LexicalScope * | findLexicalScope (const DILocation *DL) |
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc. | |
ArrayRef< LexicalScope * > | getAbstractScopesList () const |
getAbstractScopesList - Return a reference to list of abstract scopes. | |
LexicalScope * | findAbstractScope (const DILocalScope *N) |
findAbstractScope - Find an abstract scope or return null. | |
LexicalScope * | findInlinedScope (const DILocalScope *N, const DILocation *IA) |
findInlinedScope - Find an inlined scope for the given scope/inlined-at. | |
LexicalScope * | findLexicalScope (const DILocalScope *N) |
findLexicalScope - Find regular lexical scope or return null. | |
LexicalScope * | getOrCreateAbstractScope (const DILocalScope *Scope) |
getOrCreateAbstractScope - Find or create an abstract lexical scope. | |
LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.
Definition at line 141 of file LexicalScopes.h.
|
default |
bool LexicalScopes::dominates | ( | const DILocation * | DL, |
MachineBasicBlock * | MBB | ||
) |
Return true if DebugLoc's lexical scope dominates at least one machine instruction's lexical scope in a given machine basic block.
Definition at line 306 of file LexicalScopes.cpp.
References assert(), DL, getMachineBasicBlocks(), llvm::MachineBasicBlock::getParent(), and MBB.
|
inline |
empty - Return true if there is any lexical scope information available.
Definition at line 153 of file LexicalScopes.h.
Referenced by llvm::DebugHandlerBase::beginFunction(), and llvm::DwarfDebug::beginFunctionImpl().
|
inline |
findAbstractScope - Find an abstract scope or return null.
Definition at line 180 of file LexicalScopes.h.
|
inline |
findInlinedScope - Find an inlined scope for the given scope/inlined-at.
Definition at line 186 of file LexicalScopes.h.
Referenced by llvm::DbgValueHistoryMap::trimLocationRanges().
|
inline |
findLexicalScope - Find regular lexical scope or return null.
Definition at line 192 of file LexicalScopes.h.
LexicalScope * LexicalScopes::findLexicalScope | ( | const DILocation * | DL | ) |
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc.
Return NULL if not found.
Definition at line 124 of file LexicalScopes.cpp.
References DL, findLexicalScope(), and I.
Referenced by findLexicalScope(), llvm::DbgValueHistoryMap::trimLocationRanges(), and validThroughout().
|
inline |
getAbstractScopesList - Return a reference to list of abstract scopes.
Definition at line 175 of file LexicalScopes.h.
Referenced by llvm::DwarfDebug::endFunctionImpl().
|
inline |
getCurrentFunctionScope - Return lexical scope for the current function.
Definition at line 156 of file LexicalScopes.h.
Referenced by llvm::DwarfDebug::beginFunctionImpl(), llvm::CodeViewDebug::endFunctionImpl(), llvm::DwarfDebug::endFunctionImpl(), and llvm::DebugHandlerBase::identifyScopeMarkers().
void LexicalScopes::getMachineBasicBlocks | ( | const DILocation * | DL, |
SmallPtrSetImpl< const MachineBasicBlock * > & | MBBs | ||
) |
getMachineBasicBlocks - Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc.
Definition at line 280 of file LexicalScopes.cpp.
References assert(), llvm::SmallPtrSetImplBase::clear(), DL, llvm::SmallPtrSetImpl< PtrType >::insert(), and MBB.
Referenced by dominates().
LexicalScope * LexicalScopes::getOrCreateAbstractScope | ( | const DILocalScope * | Scope | ) |
getOrCreateAbstractScope - Find or create an abstract lexical scope.
Definition at line 212 of file LexicalScopes.cpp.
References assert(), llvm::Block, getOrCreateAbstractScope(), and I.
Referenced by llvm::DwarfDebug::endFunctionImpl(), and getOrCreateAbstractScope().
void LexicalScopes::initialize | ( | const MachineFunction & | Fn | ) |
initialize - Scan machine function and constuct lexical scope nest, resets the instance if necessary.
initialize - Scan machine function and constuct lexical scope nest.
Definition at line 51 of file LexicalScopes.cpp.
References llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), llvm::DICompileUnit::NoDebug, and reset().
Referenced by llvm::DebugHandlerBase::beginFunction().
void LexicalScopes::reset | ( | ) |
releaseMemory - release memory.
reset - Reset the instance so that it's prepared for another function.
Definition at line 40 of file LexicalScopes.cpp.
Referenced by initialize().