class LexicalScopes
Declaration
class LexicalScopes { /* full declaration omitted */ };
Description
LexicalScopes - This class provides interface to collect and use lexical scoping information from machine instruction.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:141
Member Variables
- private const llvm::MachineFunction* MF = nullptr
- private std::unordered_map<const DILocalScope*, LexicalScope> LexicalScopeMap
- LexicalScopeMap - Tracks the scopes in the current function.
- private std::unordered_map<std::pair<const DILocalScope*, const DILocation*>, LexicalScope, pair_hash<const DILocalScope*, const DILocation*>> InlinedLexicalScopeMap
- InlinedLexicalScopeMap - Tracks inlined function scopes in current function.
- private std::unordered_map<const DILocalScope*, LexicalScope> AbstractScopeMap
- AbstractScopeMap - These scopes are not included LexicalScopeMap.
- private SmallVector<llvm::LexicalScope*, 4> AbstractScopesList
- AbstractScopesList - Tracks abstract scopes constructed while processing a function.
- private llvm::LexicalScope* CurrentFnLexicalScope = nullptr
- CurrentFnLexicalScope - Top level scope for the current function.
- private DenseMap<const llvm::DILocation*, std::unique_ptr<BlockSetT>> DominatedBlocks
Method Overview
- public LexicalScopes()
- private void assignInstructionRanges(SmallVectorImpl<llvm::InsnRange> & MIRanges, DenseMap<const llvm::MachineInstr *, llvm::LexicalScope *> & M)
- private void constructScopeNest(llvm::LexicalScope * Scope)
- public bool dominates(const llvm::DILocation * DL, llvm::MachineBasicBlock * MBB)
- public bool empty()
- private void extractLexicalScopes(SmallVectorImpl<llvm::InsnRange> & MIRanges, DenseMap<const llvm::MachineInstr *, llvm::LexicalScope *> & M)
- public llvm::LexicalScope * findAbstractScope(const llvm::DILocalScope * N)
- public llvm::LexicalScope * findInlinedScope(const llvm::DILocalScope * N, const llvm::DILocation * IA)
- public llvm::LexicalScope * findLexicalScope(const llvm::DILocation * DL)
- public llvm::LexicalScope * findLexicalScope(const llvm::DILocalScope * N)
- public ArrayRef<llvm::LexicalScope *> getAbstractScopesList() const
- public llvm::LexicalScope * getCurrentFunctionScope() const
- public void getMachineBasicBlocks(const llvm::DILocation * DL, SmallPtrSetImpl<const llvm::MachineBasicBlock *> & MBBs)
- public llvm::LexicalScope * getOrCreateAbstractScope(const llvm::DILocalScope * Scope)
- private llvm::LexicalScope * getOrCreateInlinedScope(const llvm::DILocalScope * Scope, const llvm::DILocation * InlinedAt)
- private llvm::LexicalScope * getOrCreateLexicalScope(const llvm::DILocalScope * Scope, const llvm::DILocation * IA = nullptr)
- private llvm::LexicalScope * getOrCreateLexicalScope(const llvm::DILocation * DL)
- private llvm::LexicalScope * getOrCreateRegularScope(const llvm::DILocalScope * Scope)
- public void initialize(const llvm::MachineFunction &)
- public void reset()
Methods
¶LexicalScopes()
LexicalScopes()
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:143
¶void assignInstructionRanges(
SmallVectorImpl<llvm::InsnRange>& MIRanges,
DenseMap<const llvm::MachineInstr*,
llvm::LexicalScope*>& M)
void assignInstructionRanges(
SmallVectorImpl<llvm::InsnRange>& MIRanges,
DenseMap<const llvm::MachineInstr*,
llvm::LexicalScope*>& M)
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:223
Parameters
- SmallVectorImpl<llvm::InsnRange>& MIRanges
- DenseMap<const llvm::MachineInstr*, llvm::LexicalScope*>& M
¶void constructScopeNest(llvm::LexicalScope* Scope)
void constructScopeNest(llvm::LexicalScope* Scope)
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:221
Parameters
- llvm::LexicalScope* Scope
¶bool dominates(const llvm::DILocation* DL,
llvm::MachineBasicBlock* MBB)
bool dominates(const llvm::DILocation* DL,
llvm::MachineBasicBlock* MBB)
Description
Return true if DebugLoc's lexical scope dominates at least one machine instruction's lexical scope in a given machine basic block.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:168
Parameters
- const llvm::DILocation* DL
- llvm::MachineBasicBlock* MBB
¶bool empty()
bool empty()
Description
empty - Return true if there is any lexical scope information available.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:153
¶void extractLexicalScopes(
SmallVectorImpl<llvm::InsnRange>& MIRanges,
DenseMap<const llvm::MachineInstr*,
llvm::LexicalScope*>& M)
void extractLexicalScopes(
SmallVectorImpl<llvm::InsnRange>& MIRanges,
DenseMap<const llvm::MachineInstr*,
llvm::LexicalScope*>& M)
Description
extractLexicalScopes - Extract instruction ranges for each lexical scopes for the given machine function.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:219
Parameters
- SmallVectorImpl<llvm::InsnRange>& MIRanges
- DenseMap<const llvm::MachineInstr*, llvm::LexicalScope*>& M
¶llvm::LexicalScope* findAbstractScope(
const llvm::DILocalScope* N)
llvm::LexicalScope* findAbstractScope(
const llvm::DILocalScope* N)
Description
findAbstractScope - Find an abstract scope or return null.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:180
Parameters
- const llvm::DILocalScope* N
¶llvm::LexicalScope* findInlinedScope(
const llvm::DILocalScope* N,
const llvm::DILocation* IA)
llvm::LexicalScope* findInlinedScope(
const llvm::DILocalScope* N,
const llvm::DILocation* IA)
Description
findInlinedScope - Find an inlined scope for the given scope/inlined-at.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:186
Parameters
- const llvm::DILocalScope* N
- const llvm::DILocation* IA
¶llvm::LexicalScope* findLexicalScope(
const llvm::DILocation* DL)
llvm::LexicalScope* findLexicalScope(
const llvm::DILocation* DL)
Description
findLexicalScope - Find lexical scope, either regular or inlined, for the given DebugLoc. Return NULL if not found.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:172
Parameters
- const llvm::DILocation* DL
¶llvm::LexicalScope* findLexicalScope(
const llvm::DILocalScope* N)
llvm::LexicalScope* findLexicalScope(
const llvm::DILocalScope* N)
Description
findLexicalScope - Find regular lexical scope or return null.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:192
Parameters
- const llvm::DILocalScope* N
¶ArrayRef<llvm::LexicalScope*>
getAbstractScopesList() const
ArrayRef<llvm::LexicalScope*>
getAbstractScopesList() const
Description
getAbstractScopesList - Return a reference to list of abstract scopes.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:175
¶llvm::LexicalScope* getCurrentFunctionScope()
const
llvm::LexicalScope* getCurrentFunctionScope()
const
Description
getCurrentFunctionScope - Return lexical scope for the current function.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:156
¶void getMachineBasicBlocks(
const llvm::DILocation* DL,
SmallPtrSetImpl<
const llvm::MachineBasicBlock*>& MBBs)
void getMachineBasicBlocks(
const llvm::DILocation* DL,
SmallPtrSetImpl<
const llvm::MachineBasicBlock*>& MBBs)
Description
getMachineBasicBlocks - Populate given set using machine basic blocks which have machine instructions that belong to lexical scope identified by DebugLoc.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:163
Parameters
- const llvm::DILocation* DL
- SmallPtrSetImpl<const llvm::MachineBasicBlock*>& MBBs
¶llvm::LexicalScope* getOrCreateAbstractScope(
const llvm::DILocalScope* Scope)
llvm::LexicalScope* getOrCreateAbstractScope(
const llvm::DILocalScope* Scope)
Description
getOrCreateAbstractScope - Find or create an abstract lexical scope.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:198
Parameters
- const llvm::DILocalScope* Scope
¶llvm::LexicalScope* getOrCreateInlinedScope(
const llvm::DILocalScope* Scope,
const llvm::DILocation* InlinedAt)
llvm::LexicalScope* getOrCreateInlinedScope(
const llvm::DILocalScope* Scope,
const llvm::DILocation* InlinedAt)
Description
getOrCreateInlinedScope - Find or create an inlined lexical scope.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:214
Parameters
- const llvm::DILocalScope* Scope
- const llvm::DILocation* InlinedAt
¶llvm::LexicalScope* getOrCreateLexicalScope(
const llvm::DILocalScope* Scope,
const llvm::DILocation* IA = nullptr)
llvm::LexicalScope* getOrCreateLexicalScope(
const llvm::DILocalScope* Scope,
const llvm::DILocation* IA = nullptr)
Description
getOrCreateLexicalScope - Find lexical scope for the given Scope/IA. If not available then create new lexical scope.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:203
Parameters
- const llvm::DILocalScope* Scope
- const llvm::DILocation* IA = nullptr
¶llvm::LexicalScope* getOrCreateLexicalScope(
const llvm::DILocation* DL)
llvm::LexicalScope* getOrCreateLexicalScope(
const llvm::DILocation* DL)
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:205
Parameters
- const llvm::DILocation* DL
¶llvm::LexicalScope* getOrCreateRegularScope(
const llvm::DILocalScope* Scope)
llvm::LexicalScope* getOrCreateRegularScope(
const llvm::DILocalScope* Scope)
Description
getOrCreateRegularScope - Find or create a regular lexical scope.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:211
Parameters
- const llvm::DILocalScope* Scope
¶void initialize(const llvm::MachineFunction&)
void initialize(const llvm::MachineFunction&)
Description
initialize - Scan machine function and constuct lexical scope nest, resets the instance if necessary.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:147
Parameters
- const llvm::MachineFunction&
¶void reset()
void reset()
Description
releaseMemory - release memory.
Declared at: llvm/include/llvm/CodeGen/LexicalScopes.h:150