|
LLVM 24.0.0git
|
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 | |
| LexicalScopes (const LexicalScopes &)=delete | |
| LexicalScopes & | operator= (const LexicalScopes &)=delete |
| LLVM_ABI void | scanFunction (const MachineFunction &) |
| Scan machine function and constuct lexical scope nest, resets the instance if necessary. | |
| LLVM_ABI void | resetFunction () |
| Reset the instance so that it's prepared for another function. | |
| bool | empty () |
| Return true if there is any lexical scope information available. | |
| LexicalScope * | getCurrentFunctionScope () const |
| Return lexical scope for the current function. | |
| LLVM_ABI void | getMachineBasicBlocks (const DILocation *DL, SmallPtrSetImpl< const MachineBasicBlock * > &MBBs) |
| Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc. | |
| LLVM_ABI 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. | |
| LLVM_ABI LexicalScope * | findLexicalScope (const DILocation *DL) |
| Find lexical scope, either regular or inlined, for the given DebugLoc. | |
| ArrayRef< LexicalScope * > | getAbstractScopesList () const |
| Return a reference to list of abstract scopes. | |
| LexicalScope * | findAbstractScope (const DILocalScope *N) |
| Find an abstract scope or return null. | |
| LexicalScope * | findInlinedScope (const DILocalScope *N, const DILocation *IA) |
| Find an inlined scope for the given scope/inlined-at. | |
| LexicalScope * | findLexicalScope (const DILocalScope *N) |
| Find regular lexical scope or return null. | |
| LLVM_ABI LexicalScope * | getOrCreateAbstractScope (const DILocalScope *Scope) |
| Find or create an abstract lexical scope. | |
This class provides interface to collect and use lexical scoping information from machine instruction.
Definition at line 143 of file LexicalScopes.h.
|
default |
Referenced by LexicalScopes(), and operator=().
|
delete |
References LexicalScopes().
| 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 299 of file LexicalScopes.cpp.
References assert(), DL, getMachineBasicBlocks(), and MBB.
|
inline |
Return true if there is any lexical scope information available.
Definition at line 158 of file LexicalScopes.h.
|
inline |
Find an abstract scope or return null.
Definition at line 185 of file LexicalScopes.h.
|
inline |
Find an inlined scope for the given scope/inlined-at.
Definition at line 191 of file LexicalScopes.h.
Referenced by llvm::DbgValueHistoryMap::trimLocationRanges().
|
inline |
Find regular lexical scope or return null.
Definition at line 197 of file LexicalScopes.h.
| LexicalScope * LexicalScopes::findLexicalScope | ( | const DILocation * | DL | ) |
Find lexical scope, either regular or inlined, for the given DebugLoc.
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc.
Return NULL if not found.
Definition at line 121 of file LexicalScopes.cpp.
References DL, findLexicalScope(), and I.
Referenced by findLexicalScope(), llvm::DbgValueHistoryMap::trimLocationRanges(), and validThroughout().
|
inline |
Return a reference to list of abstract scopes.
Definition at line 180 of file LexicalScopes.h.
|
inline |
Return lexical scope for the current function.
Definition at line 161 of file LexicalScopes.h.
| void LexicalScopes::getMachineBasicBlocks | ( | const DILocation * | DL, |
| SmallPtrSetImpl< const MachineBasicBlock * > & | MBBs ) |
Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc.
getMachineBasicBlocks - Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc.
Definition at line 274 of file LexicalScopes.cpp.
References assert(), llvm::SmallPtrSetImplBase::clear(), DL, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert_range(), and llvm::make_pointer_range().
Referenced by dominates().
| LexicalScope * LexicalScopes::getOrCreateAbstractScope | ( | const DILocalScope * | Scope | ) |
Find or create an abstract lexical scope.
getOrCreateAbstractScope - Find or create an abstract lexical scope.
Definition at line 208 of file LexicalScopes.cpp.
References assert(), llvm::Block, llvm::dyn_cast(), getOrCreateAbstractScope(), I, and llvm::isa().
Referenced by getOrCreateAbstractScope().
|
delete |
References LexicalScopes(), and LLVM_ABI.
| void LexicalScopes::resetFunction | ( | ) |
Reset the instance so that it's prepared for another function.
Definition at line 44 of file LexicalScopes.cpp.
Referenced by scanFunction().
| void LexicalScopes::scanFunction | ( | const MachineFunction & | Fn | ) |
Scan machine function and constuct lexical scope nest, resets the instance if necessary.
Definition at line 54 of file LexicalScopes.cpp.
References llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), resetFunction(), and skipUnit().