LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::LexicalScopes Class Reference

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...
 
LexicalScopegetCurrentFunctionScope () 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...
 
LexicalScopefindLexicalScope (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...
 
LexicalScopefindAbstractScope (const DILocalScope *N)
 findAbstractScope - Find an abstract scope or return null. More...
 
LexicalScopefindInlinedScope (const DILocalScope *N, const DILocation *IA)
 findInlinedScope - Find an inlined scope for the given scope/inlined-at. More...
 
LexicalScopefindLexicalScope (const DILocalScope *N)
 findLexicalScope - Find regular lexical scope or return null. More...
 
void dump () const
 dump - Print data structures to dbgs(). More...
 
LexicalScopegetOrCreateAbstractScope (const DILocalScope *Scope)
 getOrCreateAbstractScope - Find or create an abstract lexical scope. More...
 

Detailed Description

LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.

Definition at line 142 of file LexicalScopes.h.

Constructor & Destructor Documentation

◆ LexicalScopes()

llvm::LexicalScopes::LexicalScopes ( )
default

Member Function Documentation

◆ dominates()

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 300 of file LexicalScopes.cpp.

References assert(), llvm::LexicalScope::dominates(), llvm::MachineBasicBlock::getParent(), and I.

Referenced by isDbgValueDescribedByReg().

◆ dump()

void llvm::LexicalScopes::dump ( ) const

dump - Print data structures to dbgs().

◆ empty()

bool llvm::LexicalScopes::empty ( )
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().

◆ findAbstractScope()

LexicalScope* llvm::LexicalScopes::findAbstractScope ( const DILocalScope N)
inline

findAbstractScope - Find an abstract scope or return null.

Definition at line 181 of file LexicalScopes.h.

References I.

Referenced by llvm::DwarfDebug::endModule().

◆ findInlinedScope()

LexicalScope* llvm::LexicalScopes::findInlinedScope ( const DILocalScope N,
const DILocation IA 
)
inline

findInlinedScope - Find an inlined scope for the given scope/inlined-at.

Definition at line 187 of file LexicalScopes.h.

References I.

Referenced by needsReferenceType(), and validThroughout().

◆ findLexicalScope() [1/2]

LexicalScope * LexicalScopes::findLexicalScope ( const DILocation DL)

◆ findLexicalScope() [2/2]

LexicalScope* llvm::LexicalScopes::findLexicalScope ( const DILocalScope N)
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().

◆ getAbstractScopesList()

ArrayRef<LexicalScope *> llvm::LexicalScopes::getAbstractScopesList ( ) const
inline

getAbstractScopesList - Return a reference to list of abstract scopes.

Definition at line 176 of file LexicalScopes.h.

Referenced by llvm::DwarfDebug::endFunctionImpl().

◆ getCurrentFunctionScope()

LexicalScope* llvm::LexicalScopes::getCurrentFunctionScope ( ) const
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::DwarfDebug::endFunctionImpl(), and llvm::DebugHandlerBase::identifyScopeMarkers().

◆ getMachineBasicBlocks()

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 278 of file LexicalScopes.cpp.

References assert(), llvm::SmallPtrSetImplBase::clear(), llvm::LexicalScope::getRanges(), and llvm::SmallPtrSetImpl< PtrType >::insert().

Referenced by isDbgValueDescribedByReg().

◆ getOrCreateAbstractScope()

LexicalScope * LexicalScopes::getOrCreateAbstractScope ( const DILocalScope Scope)

◆ initialize()

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 49 of file LexicalScopes.cpp.

References llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), llvm::DICompileUnit::NoDebug, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and reset().

Referenced by llvm::DebugHandlerBase::beginFunction(), and printExtendedName().

◆ reset()

void LexicalScopes::reset ( )

releaseMemory - release memory.

reset - Reset the instance so that it's prepared for another function.

Definition at line 39 of file LexicalScopes.cpp.

Referenced by initialize().


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