clang
9.0.0
|
#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. More... | |
bool | isLive (const Stmt *S, const VarDecl *D) |
Returns true if a variable is live at the beginning of the the statement. More... | |
bool | isLive (const Stmt *Loc, const Stmt *StmtVal) |
Returns true the block-level expression "value" is live before the given block-level expression (see runOnAllBlocks). More... | |
void | dumpBlockLiveness (const SourceManager &M) |
Print to stderr the variable liveness information associated with each basic block. More... | |
void | dumpStmtLiveness (const SourceManager &M) |
Print to stderr the statement liveness information associated with each basic block. More... | |
void | runOnAllBlocks (Observer &obs) |
![]() | |
virtual | ~ManagedAnalysis () |
Static Public Member Functions | |
static LiveVariables * | computeLiveness (AnalysisDeclContext &analysisContext, bool killAtAssign) |
Compute the liveness information for a given CFG. More... | |
static LiveVariables * | create (AnalysisDeclContext &analysisContext) |
static const void * | getTag () |
Additional Inherited Members | |
![]() | |
ManagedAnalysis ()=default | |
Definition at line 28 of file LiveVariables.h.
|
override |
Definition at line 536 of file LiveVariables.cpp.
Referenced by clang::LiveVariables::Observer::observerKill().
|
static |
Compute the liveness information for a given CFG.
Definition at line 541 of file LiveVariables.cpp.
References clang::CFGBlock::begin(), clang::CFG::begin(), clang::CFGBlock::end(), clang::CFG::end(), clang::LiveVariables::LivenessValues::equals(), clang::CFGBlock::getBlockID(), clang::AnalysisDeclContext::getCFG(), clang::CFG::getNumBlockIDs(), clang::ast_matchers::stmt, clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_end().
Referenced by create(), clang::RelaxedLiveVariables::create(), and clang::LiveVariables::Observer::observerKill().
|
inlinestatic |
Definition at line 100 of file LiveVariables.h.
References computeLiveness(), getTag(), and clang::LiveVariables::LivenessValues::LiveVariables.
void LiveVariables::dumpBlockLiveness | ( | const SourceManager & | M | ) |
Print to stderr the variable liveness information associated with each basic block.
Definition at line 618 of file LiveVariables.cpp.
References clang::Decl::getBeginLoc(), clang::CFGBlock::getBlockID(), getImpl(), and clang::LiveVariables::LivenessValues::liveDecls.
void LiveVariables::dumpStmtLiveness | ( | const SourceManager & | M | ) |
Print to stderr the statement liveness information associated with each basic block.
Definition at line 664 of file LiveVariables.cpp.
References clang::Stmt::dump(), and getImpl().
|
static |
Definition at line 682 of file LiveVariables.cpp.
Referenced by create(), and clang::RelaxedLiveVariables::create().
Return true if a variable is live at the end of a specified block.
Definition at line 183 of file LiveVariables.cpp.
References getImpl(), and isAlwaysAlive().
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 187 of file LiveVariables.cpp.
Returns true the block-level expression "value" is live before the given block-level expression (see runOnAllBlocks).
Definition at line 191 of file LiveVariables.cpp.
void LiveVariables::runOnAllBlocks | ( | LiveVariables::Observer & | obs | ) |
Definition at line 528 of file LiveVariables.cpp.
References clang::CFG::begin(), clang::CFG::end(), and getImpl().