14 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H 15 #define LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H 19 #include "llvm/ADT/ImmutableSet.h" 40 : liveStmts(nullptr), liveDecls(nullptr) {}
44 : liveStmts(LiveStmts), liveDecls(LiveDecls) {}
53 virtual void anchor();
98 static const void *
getTag();
111 static const void *
getTag();
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.
Stmt - This represents one statement.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
bool equals(const LivenessValues &V) const
LivenessValues(llvm::ImmutableSet< const Stmt *> LiveStmts, llvm::ImmutableSet< const VarDecl *> LiveDecls)
AnalysisDeclContext contains the context data for the function or method under analysis.
void runOnAllBlocks(Observer &obs)
~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
Dataflow Directional Tag Classes.
bool isLive(const Stmt *S) const
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)
A reference to a declared variable, function, enum, etc.
This class handles loading and caching of source files into memory.
friend class LiveVariables