clang 10.0.0git

Public Types | Public Member Functions | Protected Attributes | List of all members
clang::DataflowValues< ValueTypes, _AnalysisDirTag > Class Template Reference

DataflowValues. Container class to store dataflow values for a CFG. More...

`#include "clang/Analysis/FlowSensitive/DataflowValues.h"`

Collaboration diagram for clang::DataflowValues< ValueTypes, _AnalysisDirTag >:
[legend]

## Public Types
typedef ValueTypes::ValTy | ValTy
typedef ValueTypes::AnalysisDataTy | AnalysisDataTy
typedef _AnalysisDirTag | AnalysisDirTag
typedef llvm::DenseMap< ProgramPoint, ValTy > | EdgeDataMapTy
typedef llvm::DenseMap< const CFGBlock *, ValTy > | BlockDataMapTy
typedef llvm::DenseMap< const Stmt *, ValTy > | StmtDataMapTy

## Public Member Functions
bool | isForwardAnalysis ()
| isForwardAnalysis - Returns true if the dataflow values are computed from a forward analysis. More...
bool | isBackwardAnalysis ()
| isBackwardAnalysis - Returns true if the dataflow values are computed from a backward analysis. More...
| DataflowValues ()
| ~DataflowValues ()
void | InitializeValues (const CFG &cfg)
| InitializeValues - Invoked by the solver to initialize state needed for dataflow analysis. More...
ValTy & | getEdgeData (const BlockEdge &E)
| getEdgeData - Retrieves the dataflow values associated with a CFG edge. More...
const ValTy & | getEdgeData (const BlockEdge &E) const
ValTy & | getBlockData (const CFGBlock *B)
| getBlockData - Retrieves the dataflow values associated with a specified CFGBlock. More...
const ValTy & | getBlockData (const CFGBlock *B) const
ValTy & | getStmtData (const Stmt *S)
| getStmtData - Retrieves the dataflow values associated with a specified Stmt. More...
const ValTy & | getStmtData (const Stmt *S) const
EdgeDataMapTy & | getEdgeDataMap ()
| getEdgeDataMap - Retrieves the internal map between CFG edges and dataflow values. More...
const EdgeDataMapTy & | getEdgeDataMap () const
BlockDataMapTy & | getBlockDataMap ()
| getBlockDataMap - Retrieves the internal map between CFGBlocks and dataflow values. More...
const BlockDataMapTy & | getBlockDataMap () const
StmtDataMapTy & | getStmtDataMap ()
| getStmtDataMap - Retrieves the internal map between Stmts and dataflow values. More...
const StmtDataMapTy & | getStmtDataMap () const
AnalysisDataTy & | getAnalysisData ()
| getAnalysisData - Retrieves the meta data associated with a dataflow analysis for analyzing a particular CFG. More...
const AnalysisDataTy & | getAnalysisData () const

## Protected Attributes
EdgeDataMapTy | EdgeDataMap
BlockDataMapTy | BlockDataMap
StmtDataMapTy * | StmtDataMap
AnalysisDataTy | AnalysisData

## Detailed Description

### template<typename ValueTypes, typename _AnalysisDirTag = dataflow::forward_analysis_tag>
class clang::DataflowValues< ValueTypes, _AnalysisDirTag >

DataflowValues. Container class to store dataflow values for a CFG.

Definition at line 40 of file DataflowValues.h.

## Member Typedef Documentation

## ◆ AnalysisDataTy

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef ValueTypes::AnalysisDataTy clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisDataTy

Definition at line 48 of file DataflowValues.h.

## ◆ AnalysisDirTag

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef _AnalysisDirTag clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisDirTag

Definition at line 49 of file DataflowValues.h.

## ◆ BlockDataMapTy

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef llvm::DenseMap<const CFGBlock*, ValTy> clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMapTy

Definition at line 51 of file DataflowValues.h.

## ◆ EdgeDataMapTy

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef llvm::DenseMap<ProgramPoint, ValTy> clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMapTy

Definition at line 50 of file DataflowValues.h.

## ◆ StmtDataMapTy

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef llvm::DenseMap<const Stmt*, ValTy> clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMapTy

Definition at line 52 of file DataflowValues.h.

## ◆ ValTy

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

typedef ValueTypes::ValTy clang::DataflowValues< ValueTypes, _AnalysisDirTag >::ValTy

Definition at line 47 of file DataflowValues.h.

## Constructor & Destructor Documentation

## ◆ DataflowValues()

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

clang::DataflowValues< ValueTypes, _AnalysisDirTag >::DataflowValues | ( |  | ) |
| inline

Definition at line 76 of file DataflowValues.h.

## ◆ ~DataflowValues()

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

clang::DataflowValues< ValueTypes, _AnalysisDirTag >::~DataflowValues | ( |  | ) |
| inline

Definition at line 77 of file DataflowValues.h.

## Member Function Documentation

## ◆ getAnalysisData() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

AnalysisDataTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getAnalysisData | ( |  | ) |
| 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 156 of file DataflowValues.h.

## ◆ getAnalysisData() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const AnalysisDataTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getAnalysisData | ( |  | ) | const
| inline

Definition at line 157 of file DataflowValues.h.

## ◆ getBlockData() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockData | ( | const CFGBlock * | B | ) |
| 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 100 of file DataflowValues.h.

## ◆ getBlockData() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockData | ( | const CFGBlock * | B | ) | const
| inline

Definition at line 106 of file DataflowValues.h.

## ◆ getBlockDataMap() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

BlockDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockDataMap | ( |  | ) |
| 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 correpsond to the dataflow values at the end of the block.

Definition at line 138 of file DataflowValues.h.

## ◆ getBlockDataMap() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const BlockDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getBlockDataMap | ( |  | ) | const
| inline

Definition at line 139 of file DataflowValues.h.

## ◆ getEdgeData() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeData | ( | const BlockEdge & | E | ) |
| inline

getEdgeData - Retrieves the dataflow values associated with a CFG edge.

Definition at line 86 of file DataflowValues.h.

## ◆ getEdgeData() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeData | ( | const BlockEdge & | E | ) | const
| inline

Definition at line 92 of file DataflowValues.h.

## ◆ getEdgeDataMap() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

EdgeDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeDataMap | ( |  | ) |
| 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 130 of file DataflowValues.h.

## ◆ getEdgeDataMap() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const EdgeDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getEdgeDataMap | ( |  | ) | const
| inline

Definition at line 131 of file DataflowValues.h.

## ◆ getStmtData() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtData | ( | const Stmt * | S | ) |
| 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 116 of file DataflowValues.h.

## ◆ getStmtData() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const ValTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtData | ( | const Stmt * | S | ) | const
| inline

Definition at line 123 of file DataflowValues.h.

## ◆ getStmtDataMap() [1/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

StmtDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtDataMap | ( |  | ) |
| inline

getStmtDataMap - Retrieves the internal map between Stmts and dataflow values.

Definition at line 143 of file DataflowValues.h.

## ◆ getStmtDataMap() [2/2]

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

const StmtDataMapTy& clang::DataflowValues< ValueTypes, _AnalysisDirTag >::getStmtDataMap | ( |  | ) | const
| inline

Definition at line 148 of file DataflowValues.h.

## ◆ InitializeValues()

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

void clang::DataflowValues< ValueTypes, _AnalysisDirTag >::InitializeValues | ( | const CFG & | cfg | ) |
| inline

InitializeValues - Invoked by the solver to initialize state needed for dataflow analysis.

This method is usually specialized by subclasses.

Definition at line 81 of file DataflowValues.h.

## ◆ isBackwardAnalysis()

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

bool clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isBackwardAnalysis | ( |  | ) |
| inline

isBackwardAnalysis - Returns true if the dataflow values are computed from a backward analysis.

Definition at line 65 of file DataflowValues.h.

## ◆ isForwardAnalysis()

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

bool clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis | ( |  | ) |
| inline

isForwardAnalysis - Returns true if the dataflow values are computed from a forward analysis.

Definition at line 61 of file DataflowValues.h.

References clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis().

Referenced by clang::DataflowValues< ValueTypes, _AnalysisDirTag >::isForwardAnalysis().

## Member Data Documentation

## ◆ AnalysisData

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

AnalysisDataTy clang::DataflowValues< ValueTypes, _AnalysisDirTag >::AnalysisData
| protected

Definition at line 167 of file DataflowValues.h.

## ◆ BlockDataMap

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

BlockDataMapTy clang::DataflowValues< ValueTypes, _AnalysisDirTag >::BlockDataMap
| protected

Definition at line 165 of file DataflowValues.h.

## ◆ EdgeDataMap

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

EdgeDataMapTy clang::DataflowValues< ValueTypes, _AnalysisDirTag >::EdgeDataMap
| protected

Definition at line 164 of file DataflowValues.h.

## ◆ StmtDataMap

template<typename ValueTypes , typename _AnalysisDirTag = dataflow::forward_analysis_tag>

StmtDataMapTy* clang::DataflowValues< ValueTypes, _AnalysisDirTag >::StmtDataMap
| protected

Definition at line 166 of file DataflowValues.h.

The documentation for this class was generated from the following file:

- include/clang/Analysis/FlowSensitive/DataflowValues.h