clang 20.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 554 of file LiveVariables.cpp.
|
static |
Compute the liveness information for a given CFG.
Definition at line 559 of file LiveVariables.cpp.
References clang::DataflowWorklistBase< Comp, QueueSize >::dequeue(), clang::DataflowWorklistBase< Comp, QueueSize >::enqueueBlock(), clang::BackwardDataflowWorklist::enqueuePredecessors(), clang::LiveVariables::LivenessValues::equals(), clang::CFGBlock::getBlockID(), clang::CFG::getNumBlockIDs(), clang::CFG::nodes(), clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_end().
Referenced by create(), and clang::RelaxedLiveVariables::create().
|
inlinestatic |
Definition at line 101 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 614 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 660 of file LiveVariables.cpp.
References getImpl().
|
static |
Definition at line 678 of file LiveVariables.cpp.
Return true if a variable is live at the end of a specified block.
Definition at line 141 of file LiveVariables.cpp.
References D, 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 149 of file LiveVariables.cpp.
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 145 of file LiveVariables.cpp.
References D, getImpl(), and isAlwaysAlive().
void LiveVariables::runOnAllBlocks | ( | LiveVariables::Observer & | obs | ) |
Definition at line 546 of file LiveVariables.cpp.
References clang::CFG::begin(), clang::CFG::end(), and getImpl().