LLVM  8.0.1
Public Member Functions | List of all members
llvm::LexicalScope Class Reference

LexicalScope - This class is used to track scope information. More...

#include "llvm/CodeGen/LexicalScopes.h"

Public Member Functions

 LexicalScope (LexicalScope *P, const DILocalScope *D, const DILocation *I, bool A)
 
LexicalScopegetParent () const
 
const MDNodegetDesc () const
 
const DILocationgetInlinedAt () const
 
const DILocalScopegetScopeNode () const
 
bool isAbstractScope () const
 
SmallVectorImpl< LexicalScope * > & getChildren ()
 
SmallVectorImpl< InsnRange > & getRanges ()
 
void addChild (LexicalScope *S)
 addChild - Add a child scope. More...
 
void openInsnRange (const MachineInstr *MI)
 openInsnRange - This scope covers instruction range starting from MI. More...
 
void extendInsnRange (const MachineInstr *MI)
 extendInsnRange - Extend the current instruction range covered by this scope. More...
 
void closeInsnRange (LexicalScope *NewScope=nullptr)
 closeInsnRange - Create a range based on FirstInsn and LastInsn collected until now. More...
 
bool dominates (const LexicalScope *S) const
 dominates - Return true if current scope dominates given lexical scope. More...
 
unsigned getDFSOut () const
 
void setDFSOut (unsigned O)
 
unsigned getDFSIn () const
 
void setDFSIn (unsigned I)
 
void dump (unsigned Indent=0) const
 dump - print lexical scope. More...
 

Detailed Description

LexicalScope - This class is used to track scope information.

Definition at line 45 of file LexicalScopes.h.

Constructor & Destructor Documentation

◆ LexicalScope()

llvm::LexicalScope::LexicalScope ( LexicalScope P,
const DILocalScope D,
const DILocation I,
bool  A 
)
inline

Member Function Documentation

◆ addChild()

void llvm::LexicalScope::addChild ( LexicalScope S)
inline

addChild - Add a child scope.

Definition at line 70 of file LexicalScopes.h.

Referenced by LexicalScope().

◆ closeInsnRange()

void llvm::LexicalScope::closeInsnRange ( LexicalScope NewScope = nullptr)
inline

closeInsnRange - Create a range based on FirstInsn and LastInsn collected until now.

This is used when a new scope is encountered while walking machine instructions.

Definition at line 93 of file LexicalScopes.h.

References assert(), closeInsnRange(), dominates(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced by closeInsnRange(), and llvm::LexicalScopes::getOrCreateAbstractScope().

◆ dominates()

bool llvm::LexicalScope::dominates ( const LexicalScope S) const
inline

dominates - Return true if current scope dominates given lexical scope.

Definition at line 105 of file LexicalScopes.h.

References getDFSIn(), and getDFSOut().

Referenced by closeInsnRange(), llvm::LexicalScopes::dominates(), llvm::LexicalScopes::getCurrentFunctionScope(), and llvm::LexicalScopes::getOrCreateAbstractScope().

◆ dump()

LLVM_DUMP_METHOD void LexicalScope::dump ( unsigned  Indent = 0) const

dump - print lexical scope.

Definition at line 322 of file LexicalScopes.cpp.

References llvm::dbgs(), llvm::Metadata::dump(), llvm::raw_ostream::indent(), and N.

Referenced by llvm::LexicalScopes::findLexicalScope(), and setDFSIn().

◆ extendInsnRange()

void llvm::LexicalScope::extendInsnRange ( const MachineInstr MI)
inline

extendInsnRange - Extend the current instruction range covered by this scope.

Definition at line 83 of file LexicalScopes.h.

References assert(), extendInsnRange(), and MI.

Referenced by extendInsnRange(), and llvm::LexicalScopes::getOrCreateAbstractScope().

◆ getChildren()

SmallVectorImpl<LexicalScope *>& llvm::LexicalScope::getChildren ( )
inline

◆ getDesc()

const MDNode* llvm::LexicalScope::getDesc ( ) const
inline

Definition at line 62 of file LexicalScopes.h.

◆ getDFSIn()

unsigned llvm::LexicalScope::getDFSIn ( ) const
inline

Definition at line 116 of file LexicalScopes.h.

Referenced by dominates().

◆ getDFSOut()

unsigned llvm::LexicalScope::getDFSOut ( ) const
inline

Definition at line 114 of file LexicalScopes.h.

Referenced by dominates().

◆ getInlinedAt()

const DILocation* llvm::LexicalScope::getInlinedAt ( ) const
inline

◆ getParent()

LexicalScope* llvm::LexicalScope::getParent ( ) const
inline

Definition at line 61 of file LexicalScopes.h.

Referenced by llvm::DwarfCompileUnit::constructScopeDIE().

◆ getRanges()

SmallVectorImpl<InsnRange>& llvm::LexicalScope::getRanges ( )
inline

◆ getScopeNode()

const DILocalScope* llvm::LexicalScope::getScopeNode ( ) const
inline

◆ isAbstractScope()

bool llvm::LexicalScope::isAbstractScope ( ) const
inline

◆ openInsnRange()

void llvm::LexicalScope::openInsnRange ( const MachineInstr MI)
inline

openInsnRange - This scope covers instruction range starting from MI.

Definition at line 73 of file LexicalScopes.h.

References MI, and openInsnRange().

Referenced by llvm::LexicalScopes::getOrCreateAbstractScope(), and openInsnRange().

◆ setDFSIn()

void llvm::LexicalScope::setDFSIn ( unsigned  I)
inline

Definition at line 117 of file LexicalScopes.h.

References dump(), I, and Indent.

◆ setDFSOut()

void llvm::LexicalScope::setDFSOut ( unsigned  O)
inline

Definition at line 115 of file LexicalScopes.h.

References llvm::RISCVFenceField::O.

Referenced by llvm::LexicalScopes::getOrCreateAbstractScope().


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