LLVM
8.0.1
|
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. More... | |
void | reset () |
releaseMemory - release memory. More... | |
bool | empty () |
empty - Return true if there is any lexical scope information available. More... | |
LexicalScope * | getCurrentFunctionScope () const |
getCurrentFunctionScope - Return lexical scope for the current function. More... | |
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. More... | |
bool | dominates (const DILocation *DL, MachineBasicBlock *MBB) |
dominates - Return true if DebugLoc's lexical scope dominates at least one machine instruction's lexical scope in a given machine basic block. More... | |
LexicalScope * | findLexicalScope (const DILocation *DL) |
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc. More... | |
ArrayRef< LexicalScope * > | getAbstractScopesList () const |
getAbstractScopesList - Return a reference to list of abstract scopes. More... | |
LexicalScope * | findAbstractScope (const DILocalScope *N) |
findAbstractScope - Find an abstract scope or return null. More... | |
LexicalScope * | findInlinedScope (const DILocalScope *N, const DILocation *IA) |
findInlinedScope - Find an inlined scope for the given scope/inlined-at. More... | |
LexicalScope * | findLexicalScope (const DILocalScope *N) |
findLexicalScope - Find regular lexical scope or return null. More... | |
void | dump () const |
dump - Print data structures to dbgs(). More... | |
LexicalScope * | getOrCreateAbstractScope (const DILocalScope *Scope) |
getOrCreateAbstractScope - Find or create an abstract lexical scope. More... | |
LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.
Definition at line 142 of file LexicalScopes.h.
|
default |
bool LexicalScopes::dominates | ( | const DILocation * | DL, |
MachineBasicBlock * | MBB | ||
) |
dominates - 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 301 of file LexicalScopes.cpp.
References assert(), llvm::LexicalScope::dominates(), llvm::MachineBasicBlock::getParent(), and I.
Referenced by isDbgValueDescribedByReg().
void llvm::LexicalScopes::dump | ( | ) | const |
dump - Print data structures to dbgs().
|
inline |
empty - Return true if there is any lexical scope information available.
Definition at line 154 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 181 of file LexicalScopes.h.
References I.
|
inline |
findInlinedScope - Find an inlined scope for the given scope/inlined-at.
Definition at line 187 of file LexicalScopes.h.
References I.
Referenced by validThroughout().
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 123 of file LexicalScopes.cpp.
References assert(), llvm::MachineFunction::getFunction(), llvm::DILocalScope::getNonLexicalBlockFileScope(), getOrCreateAbstractScope(), llvm::DILocalScope::getSubprogram(), I, if(), llvm::DICompileUnit::NoDebug, and P.
Referenced by validThroughout().
|
inline |
findLexicalScope - Find regular lexical scope or return null.
Definition at line 193 of file LexicalScopes.h.
References llvm::LexicalScope::dump(), I, and llvm::LexicalScope::LexicalScope().
|
inline |
getAbstractScopesList - Return a reference to list of abstract scopes.
Definition at line 176 of file LexicalScopes.h.
Referenced by llvm::DwarfDebug::endFunctionImpl().
|
inline |
getCurrentFunctionScope - Return lexical scope for the current function.
Definition at line 157 of file LexicalScopes.h.
References llvm::LexicalScope::dominates().
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 279 of file LexicalScopes.cpp.
References assert(), llvm::SmallPtrSetImplBase::clear(), llvm::LexicalScope::getRanges(), and llvm::SmallPtrSetImpl< PtrType >::insert().
Referenced by isDbgValueDescribedByReg().
LexicalScope * LexicalScopes::getOrCreateAbstractScope | ( | const DILocalScope * | Scope | ) |
getOrCreateAbstractScope - Find or create an abstract lexical scope.
Definition at line 211 of file LexicalScopes.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::LexicalScope::closeInsnRange(), llvm::LexicalScope::dominates(), llvm::SmallVectorBase::empty(), llvm::LexicalScope::extendInsnRange(), llvm::LexicalScope::getChildren(), llvm::DILocalScope::getNonLexicalBlockFileScope(), I, if(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::LexicalScope::openInsnRange(), llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::LexicalScope::setDFSOut().
Referenced by findLexicalScope().
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 50 of file LexicalScopes.cpp.
References llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), llvm::DICompileUnit::NoDebug, llvm::SmallVectorTemplateBase< T, bool >::push_back(), 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().