13#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H
14#define LLVM_CLANG_ANALYSIS_ANALYSES_LIVEVARIABLES_H
18#include "llvm/ADT/ImmutableSet.h"
43 llvm::ImmutableSet<const VarDecl *> LiveDecls,
44 llvm::ImmutableSet<const BindingDecl *> LiveBindings)
55 virtual void anchor();
73 static std::unique_ptr<LiveVariables>
100 static std::unique_ptr<LiveVariables>
105 static const void *
getTag();
114 static std::unique_ptr<LiveVariables>
119 static const void *
getTag();
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
AnalysisDeclContext contains the context data for the function, method or block under analysis.
Represents a single basic block in a source-level CFG.
A reference to a declared variable, function, enum, etc.
This represents one expression.
llvm::ImmutableSet< const BindingDecl * > liveBindings
LivenessValues(llvm::ImmutableSet< const Expr * > liveExprs, llvm::ImmutableSet< const VarDecl * > LiveDecls, llvm::ImmutableSet< const BindingDecl * > LiveBindings)
llvm::ImmutableSet< const Expr * > liveExprs
llvm::ImmutableSet< const VarDecl * > liveDecls
bool isLive(const Expr *E) const
bool equals(const LivenessValues &V) const
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.
virtual void observerKill(const DeclRefExpr *DR)
Called when the live variables analysis registers that a variable is killed.
static std::unique_ptr< LiveVariables > create(AnalysisDeclContext &analysisContext)
void dumpExprLiveness(const SourceManager &M)
Print to stderr the expression liveness information associated with each basic block.
void dumpBlockLiveness(const SourceManager &M)
Print to stderr the variable liveness information associated with each basic block.
void runOnAllBlocks(Observer &obs)
~LiveVariables() override
static const void * getTag()
bool isLive(const CFGBlock *B, const VarDecl *D)
Return true if a variable is live at the end of a specified block.
static std::unique_ptr< LiveVariables > computeLiveness(AnalysisDeclContext &analysisContext, bool killAtAssign)
Compute the liveness information for a given CFG.
The base class of a hierarchy of objects representing analyses tied to AnalysisDeclContext.
static std::unique_ptr< LiveVariables > create(AnalysisDeclContext &analysisContext)
static const void * getTag()
This class handles loading and caching of source files into memory.
Stmt - This represents one statement.
Represents a variable declaration or definition.
The JSON file list parser is used to communicate input to InstallAPI.