LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::dataflow Namespace Reference

Classes

class  AbstractLatticeValue
class  AbstractSparseForwardDataFlowAnalysis
 LLZK: This class has been ported from the MLIR DenseAnalysis utilities to allow for the use of custom LLZK symbol lookup logic. More...
class  SparseForwardDataFlowAnalysis
 A sparse forward data-flow analysis for propagating SSA value lattices across the IR by implementing transfer functions for operations. More...

Concepts

concept  ScalarLatticeValue

Typedefs

using AbstractSparseLattice = mlir::dataflow::AbstractSparseLattice

Functions

void loadRequiredAnalyses (DataFlowSolver &solver)
LogicalResult loadAndRunRequiredAnalyses (DataFlowSolver &solver, Operation *op)
template<typename Derived, ScalarLatticeValue ScalarTy>
mlir::raw_ostream & operator<< (mlir::raw_ostream &os, const AbstractLatticeValue< Derived, ScalarTy > &v)
void loadRequiredAnalyses (mlir::DataFlowSolver &solver)
 Loads analyses required to initialize the Executable and PredecessorState analysis states, which are required for the MLIR Dataflow analyses to properly traverse the LLZK IR.
mlir::LogicalResult loadAndRunRequiredAnalyses (mlir::DataFlowSolver &solver, mlir::Operation *op)
 Loads and runs analyses required to initialize the Executable and PredecessorState analysis states, which are required for the MLIR Dataflow analyses to properly traverse the LLZK IR.

Typedef Documentation

◆ AbstractSparseLattice

using llzk::dataflow::AbstractSparseLattice = mlir::dataflow::AbstractSparseLattice

Definition at line 41 of file SparseAnalysis.h.

Function Documentation

◆ loadAndRunRequiredAnalyses() [1/2]

LogicalResult llzk::dataflow::loadAndRunRequiredAnalyses ( DataFlowSolver & solver,
Operation * op )

Definition at line 26 of file AnalysisUtil.cpp.

◆ loadAndRunRequiredAnalyses() [2/2]

mlir::LogicalResult llzk::dataflow::loadAndRunRequiredAnalyses ( mlir::DataFlowSolver & solver,
mlir::Operation * op )

Loads and runs analyses required to initialize the Executable and PredecessorState analysis states, which are required for the MLIR Dataflow analyses to properly traverse the LLZK IR.

This function pre-runs the analyses, which is helpful in cases where early region-op-body traversal is desired.

  • the bodies of scf.for, scf.while, scf.if are usually not marked as live initially, so the dataflow analysis will traverse all ops in a function before traversing the insides of region ops.
  • by pre-running the analysis, the region bodies will be explored as encountered if they are marked as "live" by the dead code analysis.
    Parameters
    solverThe solver.
    opThe operation to pre-run the analyses on.
    Returns
    Whether the pre-run analysis was successful.

◆ loadRequiredAnalyses() [1/2]

void llzk::dataflow::loadRequiredAnalyses ( DataFlowSolver & solver)

Definition at line 21 of file AnalysisUtil.cpp.

◆ loadRequiredAnalyses() [2/2]

void llzk::dataflow::loadRequiredAnalyses ( mlir::DataFlowSolver & solver)

Loads analyses required to initialize the Executable and PredecessorState analysis states, which are required for the MLIR Dataflow analyses to properly traverse the LLZK IR.

Parameters
solverThe solver.

◆ operator<<()

template<typename Derived, ScalarLatticeValue ScalarTy>
mlir::raw_ostream & llzk::dataflow::operator<< ( mlir::raw_ostream & os,
const AbstractLatticeValue< Derived, ScalarTy > & v )

Definition at line 275 of file AbstractLatticeValue.h.