class LiveVariables
Declaration
class LiveVariables : public ManagedAnalysis { /* full declaration omitted */ };
Description
The base class of a hierarchy of objects representing analyses tied to AnalysisDeclContext.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:28
Inherits from: ManagedAnalysis
Member Variables
- private void* impl
Method Overview
- private LiveVariables(void * impl)
- public static std::unique_ptr<LiveVariables> computeLiveness(clang::AnalysisDeclContext & analysisContext, bool killAtAssign)
- public static std::unique_ptr<LiveVariables> create(clang::AnalysisDeclContext & analysisContext)
- public void dumpBlockLiveness(const clang::SourceManager & M)
- public void dumpExprLiveness(const clang::SourceManager & M)
- public static const void * getTag()
- public bool isLive(const clang::CFGBlock * B, const clang::VarDecl * D)
- public bool isLive(const clang::Stmt * S, const clang::VarDecl * D)
- public bool isLive(const clang::Stmt * Loc, const clang::Expr * Val)
- public void runOnAllBlocks(clang::LiveVariables::Observer & obs)
- public ~LiveVariables()
Inherited from ManagedAnalysis:
Methods
¶LiveVariables(void* impl)
LiveVariables(void* impl)
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:108
Parameters
- void* impl
¶static std::unique_ptr<LiveVariables>
computeLiveness(
clang::AnalysisDeclContext& analysisContext,
bool killAtAssign)
static std::unique_ptr<LiveVariables>
computeLiveness(
clang::AnalysisDeclContext& analysisContext,
bool killAtAssign)
Description
Compute the liveness information for a given CFG.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:74
Parameters
- clang::AnalysisDeclContext& analysisContext
- bool killAtAssign
¶static std::unique_ptr<LiveVariables> create(
clang::AnalysisDeclContext& analysisContext)
static std::unique_ptr<LiveVariables> create(
clang::AnalysisDeclContext& analysisContext)
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:101
Parameters
- clang::AnalysisDeclContext& analysisContext
¶void dumpBlockLiveness(
const clang::SourceManager& M)
void dumpBlockLiveness(
const clang::SourceManager& M)
Description
Print to stderr the variable liveness information associated with each basic block.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:92
Parameters
- const clang::SourceManager& M
¶void dumpExprLiveness(
const clang::SourceManager& M)
void dumpExprLiveness(
const clang::SourceManager& M)
Description
Print to stderr the expression liveness information associated with each basic block.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:96
Parameters
- const clang::SourceManager& M
¶static const void* getTag()
static const void* getTag()
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:105
¶bool isLive(const clang::CFGBlock* B,
const clang::VarDecl* D)
bool isLive(const clang::CFGBlock* B,
const clang::VarDecl* D)
Description
Return true if a variable is live at the end of a specified block.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:78
Parameters
- const clang::CFGBlock* B
- const clang::VarDecl* D
¶bool isLive(const clang::Stmt* S,
const clang::VarDecl* D)
bool isLive(const clang::Stmt* S,
const clang::VarDecl* D)
Description
Returns true if a variable is live at the beginning of the the statement. This query only works if liveness information has been recorded at the statement level (see runOnAllBlocks), and only returns liveness information for block-level expressions.
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:84
Parameters
- const clang::Stmt* S
- const clang::VarDecl* D
¶bool isLive(const clang::Stmt* Loc,
const clang::Expr* Val)
bool isLive(const clang::Stmt* Loc,
const clang::Expr* Val)
Description
Returns true the block-level expression value is live before the given block-level expression (see runOnAllBlocks).
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:88
Parameters
- const clang::Stmt* Loc
- const clang::Expr* Val
¶void runOnAllBlocks(
clang::LiveVariables::Observer& obs)
void runOnAllBlocks(
clang::LiveVariables::Observer& obs)
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:98
Parameters
¶~LiveVariables()
~LiveVariables()
Declared at: clang/include/clang/Analysis/Analyses/LiveVariables.h:70