clang 22.0.0git
|
#include "clang/Analysis/Analyses/LiveVariables.h"
Classes | |
class | LivenessValues |
class | Observer |
Public Member Functions | |
~LiveVariables () override | |
bool | isLive (const CFGBlock *B, const VarDecl *D) |
Return true if a variable is live at the end of a specified block. | |
bool | isLive (const Stmt *S, const VarDecl *D) |
Returns true if a variable is live at the beginning of the the statement. | |
bool | isLive (const Stmt *Loc, const Expr *Val) |
Returns true the block-level expression value is live before the given block-level expression (see runOnAllBlocks). | |
void | dumpBlockLiveness (const SourceManager &M) |
Print to stderr the variable liveness information associated with each basic block. | |
void | dumpExprLiveness (const SourceManager &M) |
Print to stderr the expression liveness information associated with each basic block. | |
void | runOnAllBlocks (Observer &obs) |
Public Member Functions inherited from clang::ManagedAnalysis | |
virtual | ~ManagedAnalysis () |
Static Public Member Functions | |
static std::unique_ptr< LiveVariables > | computeLiveness (AnalysisDeclContext &analysisContext, bool killAtAssign) |
Compute the liveness information for a given CFG. | |
static std::unique_ptr< LiveVariables > | create (AnalysisDeclContext &analysisContext) |
static const void * | getTag () |
Additional Inherited Members | |
Protected Member Functions inherited from clang::ManagedAnalysis | |
ManagedAnalysis ()=default |
Definition at line 28 of file LiveVariables.h.
|
override |
Definition at line 526 of file LiveVariables.cpp.
|
static |
Compute the liveness information for a given CFG.
Definition at line 531 of file LiveVariables.cpp.
References clang::DataflowWorklistBase< Comp, QueueSize >::dequeue(), clang::DataflowWorklistBase< Comp, QueueSize >::enqueueBlock(), clang::BackwardDataflowWorklist::enqueuePredecessors(), clang::CFGBlock::getBlockID(), clang::AnalysisDeclContext::getCFG(), clang::CFG::getNumBlockIDs(), clang::CFG::nodes(), and clang::CFGBlock::succs().
Referenced by create(), and clang::RelaxedLiveVariables::create().
|
inlinestatic |
Definition at line 96 of file LiveVariables.h.
References computeLiveness().
void LiveVariables::dumpBlockLiveness | ( | const SourceManager & | M | ) |
Print to stderr the variable liveness information associated with each basic block.
Definition at line 585 of file LiveVariables.cpp.
References getImpl().
void LiveVariables::dumpExprLiveness | ( | const SourceManager & | M | ) |
Print to stderr the expression liveness information associated with each basic block.
Definition at line 617 of file LiveVariables.cpp.
References getImpl().
|
static |
Definition at line 642 of file LiveVariables.cpp.
Return true if a variable is live at the end of a specified block.
Definition at line 146 of file LiveVariables.cpp.
References getImpl(), and isAlwaysAlive().
Referenced by clang::ento::SymbolReaper::isLive().
Returns true the block-level expression value is live before the given block-level expression (see runOnAllBlocks).
Definition at line 154 of file LiveVariables.cpp.
References getImpl().
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.
Definition at line 150 of file LiveVariables.cpp.
References getImpl(), and isAlwaysAlive().
void LiveVariables::runOnAllBlocks | ( | LiveVariables::Observer & | obs | ) |
Definition at line 518 of file LiveVariables.cpp.
References clang::AnalysisDeclContext::getCFG(), and getImpl().