clang: clang::LiveVariables Class Reference (original) (raw)

#include "[clang/Analysis/Analyses/LiveVariables.h](LiveVariables%5F8h%5Fsource.html)"

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 ()

Definition at line 28 of file LiveVariables.h.

LiveVariables::~LiveVariables ( ) override

computeLiveness()

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().

create()

dumpBlockLiveness()

Print to stderr the variable liveness information associated with each basic block.

Definition at line 614 of file LiveVariables.cpp.

References getImpl().

dumpExprLiveness()

Print to stderr the expression liveness information associated with each basic block.

Definition at line 660 of file LiveVariables.cpp.

References getImpl().

getTag()

const void * LiveVariables::getTag ( ) static

isLive() [1/3]

isLive() [2/3]

bool LiveVariables::isLive ( const Stmt * Loc,
const Expr * Val
)

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.

References getImpl(), and Loc.

isLive() [3/3]

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().

runOnAllBlocks()


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