slang::analysis::DataFlowAnalysis class

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

template<typename F>
void visitLatches(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.
auto getTimedStatements() const -> std::span<const Statement*const>
Gets all of the statements in the procedure that have timing controls associated with them.
auto getAssertions() const -> std::span<std::variant<const Statement*, const Expression*> const>
Gets all of the concurrent assertions, procedural checkers, and assertion instance expressions in the procedure.
auto getCallExpressions() const -> std::span<const CallExpression*const>
Gets all of the subroutine calls in the procedure.
auto isReferenced(const ValueSymbol& symbol) const -> bool
Determines whether the given symbol is referenced anywhere in the procedure, either as an lvalue or an rvalue.
auto isReferenced(const ValueSymbol& symbol, const Expression& lsp) const -> bool
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.
auto inferClock(const AnalyzedProcedure* parentProcedure) const -> const TimingControl*
Gets the inferred clock for the procedure, if one exists.
auto hasReturnStatements() const -> bool
Returns true if the procedure has any return statements.
auto isReachable() const -> bool
Returns true if the current state is reachable.
auto isDefinitelyAssigned(const ValueSymbol& symbol) const -> bool
Returns true if the given symbol is definitely assigned at the current point.
auto getLValues() const -> std::span<const LValueSymbol>
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.