14 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H
15 #define LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/ImmutableSet.h"
54 virtual void anchor();
99 static const void *
getTag();
112 static const void *
getTag();
LivenessValues(llvm::ImmutableSet< const Stmt * > LiveStmts, llvm::ImmutableSet< const VarDecl * > LiveDecls)
The base class of a hierarchy of objects representing analyses tied to AnalysisDeclContext.
static LiveVariables * computeLiveness(AnalysisDeclContext &analysisContext, bool killAtAssign)
Compute the liveness information for a given CFG.
static const void * getTag()
VarDecl - An instance of this class is created to represent a variable declaration or definition...
AnalysisDeclContext contains the context data for the function or method under analysis.
void runOnAllBlocks(Observer &obs)
bool isLive(const CFGBlock *B, const VarDecl *D)
Return true if a variable is live at the end of a specified block.
~LiveVariables() override
static const void * getTag()
CFGBlock - Represents a single basic block in a source-level CFG.
virtual void observerKill(const DeclRefExpr *DR)
Called when the live variables analysis registers that a variable is killed.
void dumpBlockLiveness(const SourceManager &M)
Print to stderr the liveness information associated with each basic block.
llvm::ImmutableSet< const VarDecl * > liveDecls
static LiveVariables * create(AnalysisDeclContext &analysisContext)
llvm::ImmutableSet< const Stmt * > liveStmts
virtual void observeStmt(const Stmt *S, const CFGBlock *currentBlock, const LivenessValues &V)
A callback invoked right before invoking the liveness transfer function on the given statement...
static LiveVariables * create(AnalysisDeclContext &analysisContext)
bool isLive(const Stmt *S) const
A reference to a declared variable, function, enum, etc.
bool equals(const LivenessValues &V) const
This class handles loading and caching of source files into memory.