clang 20.0.0git
|
DataflowValues. Container class to store dataflow values for a CFG. More...
#include "clang/Analysis/FlowSensitive/DataflowValues.h"
Public Types | |
using | ValTy = typename ValueTypes::ValTy |
using | AnalysisDataTy = typename ValueTypes::AnalysisDataTy |
using | AnalysisDirTag = _AnalysisDirTag |
using | EdgeDataMapTy = llvm::DenseMap< ProgramPoint, ValTy > |
using | BlockDataMapTy = llvm::DenseMap< const CFGBlock *, ValTy > |
using | StmtDataMapTy = llvm::DenseMap< const Stmt *, ValTy > |
Public Member Functions | |
bool | isForwardAnalysis () |
isForwardAnalysis - Returns true if the dataflow values are computed from a forward analysis. | |
bool | isBackwardAnalysis () |
isBackwardAnalysis - Returns true if the dataflow values are computed from a backward analysis. | |
DataflowValues () | |
~DataflowValues () | |
void | InitializeValues (const CFG &cfg) |
InitializeValues - Invoked by the solver to initialize state needed for dataflow analysis. | |
ValTy & | getEdgeData (const BlockEdge &E) |
getEdgeData - Retrieves the dataflow values associated with a CFG edge. | |
const ValTy & | getEdgeData (const BlockEdge &E) const |
ValTy & | getBlockData (const CFGBlock *B) |
getBlockData - Retrieves the dataflow values associated with a specified CFGBlock. | |
const ValTy & | getBlockData (const CFGBlock *B) const |
ValTy & | getStmtData (const Stmt *S) |
getStmtData - Retrieves the dataflow values associated with a specified Stmt. | |
const ValTy & | getStmtData (const Stmt *S) const |
EdgeDataMapTy & | getEdgeDataMap () |
getEdgeDataMap - Retrieves the internal map between CFG edges and dataflow values. | |
const EdgeDataMapTy & | getEdgeDataMap () const |
BlockDataMapTy & | getBlockDataMap () |
getBlockDataMap - Retrieves the internal map between CFGBlocks and dataflow values. | |
const BlockDataMapTy & | getBlockDataMap () const |
StmtDataMapTy & | getStmtDataMap () |
getStmtDataMap - Retrieves the internal map between Stmts and dataflow values. | |
const StmtDataMapTy & | getStmtDataMap () const |
AnalysisDataTy & | getAnalysisData () |
getAnalysisData - Retrieves the meta data associated with a dataflow analysis for analyzing a particular CFG. | |
const AnalysisDataTy & | getAnalysisData () const |
Protected Attributes | |
EdgeDataMapTy | EdgeDataMap |
BlockDataMapTy | BlockDataMap |
StmtDataMapTy * | StmtDataMap |
AnalysisDataTy | AnalysisData |
DataflowValues. Container class to store dataflow values for a CFG.
Definition at line 41 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisDataTy = typename ValueTypes::AnalysisDataTy |
Definition at line 49 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisDirTag = _AnalysisDirTag |
Definition at line 50 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMapTy = llvm::DenseMap<const CFGBlock *, ValTy> |
Definition at line 52 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMapTy = llvm::DenseMap<ProgramPoint, ValTy> |
Definition at line 51 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMapTy = llvm::DenseMap<const Stmt *, ValTy> |
Definition at line 53 of file DataflowValues.h.
using clang::DataflowValues< ValueTypes, _AnalysisDirTag >::ValTy = typename ValueTypes::ValTy |
Definition at line 48 of file DataflowValues.h.
|
inline |
Definition at line 77 of file DataflowValues.h.
|
inline |
Definition at line 78 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMap.
|
inline |
getAnalysisData - Retrieves the meta data associated with a dataflow analysis for analyzing a particular CFG.
This is typically consumed by transfer function code (via the solver). This can also be used by subclasses to interpret the dataflow values.
Definition at line 157 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisData.
|
inline |
Definition at line 158 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisData.
|
inline |
getBlockData - Retrieves the dataflow values associated with a specified CFGBlock.
If the dataflow analysis is a forward analysis, this data is associated with the END of the block. If the analysis is a backwards analysis, it is associated with the ENTRY of the block.
Definition at line 101 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMap.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockData().
|
inline |
Definition at line 107 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockData().
|
inline |
getBlockDataMap - Retrieves the internal map between CFGBlocks and dataflow values.
If the dataflow analysis operates in the forward direction, the values correspond to the dataflow values at the start of the block. Otherwise, for a backward analysis, the values correspond to the dataflow values at the end of the block.
Definition at line 139 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMap.
|
inline |
Definition at line 140 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMap.
|
inline |
getEdgeData - Retrieves the dataflow values associated with a CFG edge.
Definition at line 87 of file DataflowValues.h.
References E, and clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMap.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeData().
|
inline |
Definition at line 93 of file DataflowValues.h.
References E, and clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeData().
|
inline |
getEdgeDataMap - Retrieves the internal map between CFG edges and dataflow values.
Usually used by a dataflow solver to compute values for blocks.
Definition at line 131 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMap.
|
inline |
Definition at line 132 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMap.
|
inline |
getStmtData - Retrieves the dataflow values associated with a specified Stmt.
If the dataflow analysis is a forward analysis, this data corresponds to the point immediately before a Stmt. If the analysis is a backwards analysis, it is associated with the point after a Stmt. This data is only computed for block-level expressions, and only when requested when the analysis is executed.
Definition at line 117 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMap.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtData().
|
inline |
Definition at line 124 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtData().
|
inline |
getStmtDataMap - Retrieves the internal map between Stmts and dataflow values.
Definition at line 144 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMap.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtDataMap().
|
inline |
Definition at line 149 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtDataMap().
|
inline |
InitializeValues - Invoked by the solver to initialize state needed for dataflow analysis.
This method is usually specialized by subclasses.
Definition at line 82 of file DataflowValues.h.
|
inline |
isBackwardAnalysis - Returns true if the dataflow values are computed from a backward analysis.
Definition at line 66 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis().
|
inline |
isForwardAnalysis - Returns true if the dataflow values are computed from a forward analysis.
Definition at line 62 of file DataflowValues.h.
References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis().
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isBackwardAnalysis(), and clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis().
|
protected |
Definition at line 168 of file DataflowValues.h.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getAnalysisData().
|
protected |
Definition at line 166 of file DataflowValues.h.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockData(), and clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockDataMap().
|
protected |
Definition at line 165 of file DataflowValues.h.
Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeData(), and clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeDataMap().
|
protected |