DataFlowAnalysis class
#include <slang/analysis/DataFlowAnalysis.h>
Performs data flow analysis on a single procedure, tracking the assigned ranges of nets and variables at each point in the procedure.
Base classes
-
template<typename TDerived, typename TState>class AbstractFlowAnalysis<DataFlowAnalysis, DataFlowState>
- An abstract class for flow analysis passes over SystemVerilog code.
Constructors, destructors, conversion operators
- DataFlowAnalysis(AnalysisContext& context, const Symbol& symbol, bool reportDiags)
- Constructs a new DataFlowAnalysis object.
Public functions
-
std::
span<const Statement*const> getTimedStatements() const - Gets all of the statements in the procedure that have timing controls associated with them.
-
std::
span<std:: variant<const Statement*, const Expression*> const> getAssertions() const - Gets all of the concurrent assertions, procedural checkers, and assertion instance expressions in the procedure.
-
std::
span<const CallExpression*const> getCallExpressions() const - Gets all of the subroutine calls in the procedure.
- bool isReferenced(const ValueSymbol& symbol) const
- Determines whether the given symbol is referenced anywhere in the procedure, either as an lvalue or an rvalue.
- bool isReferenced(const ValueSymbol& symbol, const 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 TimingControl* inferClock(const AnalyzedProcedure* parentProcedure) const
- Gets the inferred clock for the procedure, if one exists.
- bool hasReturnStatements() const
- Returns true if the procedure has any return statements.
- bool isReachable() const
- Returns true if the current state is reachable.
- bool isDefinitelyAssigned(const ValueSymbol& symbol) const
- Returns true if the given symbol is definitely assigned at the current point.
-
template<typename F>void visitPartiallyAssigned(bool skipAutomatic, F&& func) const
- Visits all of the symbols that are assigned anywhere in the procedure and aren't definitely assigned by the end of the procedure.
-
template<typename F>void visitDefinitelyAssigned(bool skipAutomatic, F&& func) 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.
- void handleTiming(const TimingControl& timing)
- Performs handling for a timing control contained in the procedure.
Public variables
- AnalysisContext& context
- The analysis context within which the analysis is being performed.