DFAResults class
#include <slang/analysis/DFAResults.h>
Contains the results of running data flow analysis on a procedure.
Derived classes must perform the walking of the procedure body and fill out various bits of information that is then queried during creation of AnalyzedProcedures.
Derived classes
-
template<typename TDerived, typename TState>class DataFlowAnalysis
- The base class for data flow analysis implementations.
-
template<typename TDerived, typename TState>class DataFlowAnalysis
- The base class for data flow analysis implementations.
Public types
- struct LValueSymbol
- Tracks assigned ranges of symbols used as lvalues in the procedure.
Public functions
-
std::
span<const ast:: Statement*const> getTimedStatements() const - Gets all of the analyzed statements that have timing controls associated with them.
-
std::
span<std:: variant<const ast:: Statement*, const ast:: Expression*> const> getAssertions() const - Gets all of the concurrent assertions, procedural checkers, and assertion instance expressions in the procedure.
-
std::
span<const ast:: CallExpression*const> getCallExpressions() const - Gets all of the subroutine calls in the procedure.
-
bool isReferenced(const ast::
ValueSymbol& symbol) const - Determines whether the given symbol is referenced anywhere in the procedure, either as an lvalue or an rvalue.
-
bool isReferenced(ast::
EvalContext& evalContext, const ast:: ValueSymbol& symbol, const ast:: Expression& lsp) const - Determines whether the given subset of the symbol (via the provided longest static prefix expression) is referenced anywhere in the procedure, either as an lvalue or an rvalue.
-
const ast::
TimingControl* inferClock(AnalysisContext& context, const ast:: Symbol& symbol, ast:: EvalContext& evalContext, const AnalyzedProcedure* parentProcedure) const - Gets the inferred clock for the procedure, if one exists.
-
bool isDefinitelyAssigned(const ast::
ValueSymbol& symbol) const - Returns true if the given symbol is definitely assigned at the current point.
- void visitPartiallyAssigned(bool skipAutomatic, AssignedSymbolCB cb) const
- Visits all of the symbols that are assigned anywhere in the procedure and aren't definitely assigned by the end of the procedure.
- void visitDefinitelyAssigned(bool skipAutomatic, AssignedSymbolCB cb) const
- Visits all of the symbols (and LSP ranges) that are definitely assigned at the current point in the procedure.
-
std::
span<const LValueSymbol> getLValues() const - Gets all of the lvalues used in the procedure.
Public variables
- bool hasReturnStatements
- Set to true if the procedure has any return statements.
- bool endIsReachable
- Set to true if the end of the procedure is reachable by at least one control flow path.
Protected variables
-
SymbolBitMap::
allocator_type bitMapAllocator - An allocator for assigned symbol bit ranges.
-
SymbolLSPMap::
allocator_type lspMapAllocator - An allocator for assigned symbol LSP ranges.
-
SmallMap<const ast::
ValueSymbol*, uint32_ t, 4> symbolToSlot - Maps visited symbols to slots in assigned vectors.
- SmallVector<LValueSymbol> lvalues
- Tracks the assigned ranges of each variable across the entire procedure, even if not all branches assign to it.
-
SmallMap<const ast::
ValueSymbol*, SymbolBitMap, 4> rvalues - All of the nets and variables that have been read in the procedure.
-
SmallVector<const ast::
Statement*> timedStatements - All statements that have timing controls associated with them.
-
SmallVector<std::
variant<const ast:: Statement*, const ast:: Expression*>> concurrentAssertions - All concurrent assertions, checkers, and assertion instance expressions in the procedure.
-
SmallVector<const ast::
CallExpression*> callExpressions - All call expressions in the procedure.
-
not_
null<const SmallVectorBase<SymbolBitMap>*> stateRef - The currently assigned state of symbols.