|
LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
The dataflow analysis that computes the set of references that LLZK operations use and produce. More...
#include <ConstraintDependencyGraph.h>
Public Types | |
| using | Lattice = SourceRefLattice |
| using | OperandValues = mlir::DenseMap<mlir::Value, const Lattice *> |
| using | Base = dataflow::SparseForwardDataFlowAnalysis<Lattice> |
Public Member Functions | |
| mlir::LogicalResult | visitOperation (mlir::Operation *op, mlir::ArrayRef< const Lattice * > operands, mlir::ArrayRef< Lattice * > results) override |
| Propagate SourceRef lattice values from operands to results. | |
| void | visitExternalCall (mlir::CallOpInterface call, mlir::ArrayRef< const Lattice * > argumentLattices, mlir::ArrayRef< Lattice * > resultLattices) override |
| Visit a call operation to an externally defined function given the lattices of its arguments. | |
| SparseForwardDataFlowAnalysis (mlir::DataFlowSolver &s) | |
| Public Member Functions inherited from llzk::dataflow::SparseForwardDataFlowAnalysis< SourceRefLattice > | |
| SparseForwardDataFlowAnalysis (mlir::DataFlowSolver &s) | |
| virtual void | visitNonControlFlowArguments (mlir::Operation *, const mlir::RegionSuccessor &successor, mlir::ArrayRef< SourceRefLattice * > argLattices, unsigned firstIndex) |
| Given an operation with possible region control-flow, the lattices of the operands, and a region successor, compute the lattice values for block arguments that are not accounted for by the branching control flow (ex. | |
| Public Member Functions inherited from llzk::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| mlir::LogicalResult | initialize (mlir::Operation *top) override |
| Initialize the analysis by visiting every owner of an SSA value: all operations and blocks. | |
| mlir::LogicalResult | visit (mlir::ProgramPoint *point) override |
| Visit a program point. | |
Static Public Member Functions | |
| static const Lattice * | getLattice (mlir::DataFlowSolver &solver, mlir::Value val) |
| static SourceRefLatticeValue | getValueState (mlir::DataFlowSolver &solver, mlir::Value val) |
| static mlir::FailureOr< SourceRefLatticeValue > | getWriteTargetState (mlir::DataFlowSolver &solver, mlir::Operation *op) |
Protected Member Functions | |
| void | setToEntryState (Lattice *lattice) override |
| Set the given lattice element(s) at control flow entry point(s). | |
| Protected Member Functions inherited from llzk::dataflow::SparseForwardDataFlowAnalysis< SourceRefLattice > | |
| SourceRefLattice * | getLatticeElement (mlir::Value value) override |
| Get the lattice element for a value. | |
| const SourceRefLattice * | getLatticeElementFor (mlir::ProgramPoint *point, mlir::Value value) |
| Get the lattice element for a value and create a dependency on the provided program point. | |
| void | setAllToEntryStates (mlir::ArrayRef< SourceRefLattice * > lattices) |
| Protected Member Functions inherited from llzk::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| AbstractSparseForwardDataFlowAnalysis (mlir::DataFlowSolver &solver) | |
| const AbstractSparseLattice * | getLatticeElementFor (mlir::ProgramPoint *point, mlir::Value value) |
| Get a read-only lattice element for a value and add it as a dependency to a program point. | |
| virtual void | setToEntryState (AbstractSparseLattice *lattice)=0 |
| Set the given lattice element(s) at control flow entry point(s). | |
| void | setAllToEntryStates (mlir::ArrayRef< AbstractSparseLattice * > lattices) |
| void | join (AbstractSparseLattice *lhs, const AbstractSparseLattice &rhs) |
| Join the lattice element and propagate and update if it changed. | |
Static Protected Member Functions | |
| static mlir::ChangeResult | fallbackOpUpdate (mlir::Operation *op, const OperandValues &operandVals, mlir::ArrayRef< Lattice * > results) |
| static SourceRefLatticeValue | arraySubdivisionOpUpdate (array::ArrayAccessOpInterface op, const OperandValues &operandVals) |
Additional Inherited Members | |
| Protected Attributes inherited from llzk::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| mlir::SymbolTableCollection | tables |
| LLZK: Added for use of symbol helper caching. | |
The dataflow analysis that computes the set of references that LLZK operations use and produce.
The analysis is simple: any operation will simply output a union of its input references, regardless of what type of operation it performs, as the analysis is operator-insensitive.
Definition at line 36 of file ConstraintDependencyGraph.h.
Definition at line 40 of file ConstraintDependencyGraph.h.
Definition at line 38 of file ConstraintDependencyGraph.h.
| using llzk::SourceRefAnalysis::OperandValues = mlir::DenseMap<mlir::Value, const Lattice *> |
Definition at line 39 of file ConstraintDependencyGraph.h.
|
staticprotected |
Definition at line 260 of file ConstraintDependencyGraph.cpp.
|
staticprotected |
Definition at line 246 of file ConstraintDependencyGraph.cpp.
|
static |
Definition at line 54 of file ConstraintDependencyGraph.cpp.
|
static |
Definition at line 58 of file ConstraintDependencyGraph.cpp.
|
static |
Definition at line 66 of file ConstraintDependencyGraph.cpp.
|
overrideprotectedvirtual |
Set the given lattice element(s) at control flow entry point(s).
Implements llzk::dataflow::SparseForwardDataFlowAnalysis< SourceRefLattice >.
Definition at line 123 of file ConstraintDependencyGraph.cpp.
|
inlineexplicit |
Definition at line 158 of file SparseAnalysis.h.
|
overridevirtual |
Visit a call operation to an externally defined function given the lattices of its arguments.
Reimplemented from llzk::dataflow::SparseForwardDataFlowAnalysis< SourceRefLattice >.
Definition at line 192 of file ConstraintDependencyGraph.cpp.
|
overridevirtual |
Propagate SourceRef lattice values from operands to results.
| op |
Implements llzk::dataflow::SparseForwardDataFlowAnalysis< SourceRefLattice >.
Definition at line 129 of file ConstraintDependencyGraph.cpp.