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();
68 static std::unique_ptr<LiveVariables>
95 static std::unique_ptr<LiveVariables>
100 static const void *
getTag();
109 static std::unique_ptr<LiveVariables>
114 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.
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt.
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
bool operator==(const LivenessValues &V) const
llvm::ImmutableSet< const VarDecl * > liveDecls
bool isLive(const Expr *E) const
friend class LiveVariables
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 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.
ManagedAnalysis()=default
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.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...