|
LLZK 0.1.0
Veridise's ZK Language IR
|
A sparse forward data-flow analysis for propagating SSA value lattices across the IR by implementing transfer functions for operations. More...
#include <SparseAnalysis.h>
Public Member Functions | |
| SparseForwardDataFlowAnalysis (mlir::DataFlowSolver &s) | |
| virtual mlir::LogicalResult | visitOperation (mlir::Operation *op, mlir::ArrayRef< const StateT * > operands, mlir::ArrayRef< StateT * > results)=0 |
| Visit an operation with the lattices of its operands. | |
| virtual void | visitExternalCall (mlir::CallOpInterface call, mlir::ArrayRef< const StateT * > argumentLattices, mlir::ArrayRef< StateT * > resultLattices) |
| Visit a call operation to an externally defined function given the lattices of its arguments. | |
| virtual void | visitNonControlFlowArguments (mlir::Operation *op, const mlir::RegionSuccessor &successor, mlir::ArrayRef< StateT * > 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. | |
Protected Member Functions | |
| StateT * | getLatticeElement (mlir::Value value) override |
| Get the lattice element for a value. | |
| const StateT * | getLatticeElementFor (mlir::ProgramPoint *point, mlir::Value value) |
| Get the lattice element for a value and create a dependency on the provided program point. | |
| virtual void | setToEntryState (StateT *lattice)=0 |
| Set the given lattice element(s) at control flow entry point(s). | |
| void | setAllToEntryStates (mlir::ArrayRef< StateT * > 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. | |
| void | setAllToEntryStates (mlir::ArrayRef< AbstractSparseLattice * > lattices) |
| void | join (AbstractSparseLattice *lhs, const AbstractSparseLattice &rhs) |
| Join the lattice element and propagate and update if it changed. | |
Additional Inherited Members | |
| Protected Attributes inherited from llzk::dataflow::AbstractSparseForwardDataFlowAnalysis | |
| mlir::SymbolTableCollection | tables |
| LLZK: Added for use of symbol helper caching. | |
A sparse forward data-flow analysis for propagating SSA value lattices across the IR by implementing transfer functions for operations.
StateT is expected to be a subclass of AbstractSparseLattice.
Definition at line 151 of file SparseAnalysis.h.
|
inlineexplicit |
Definition at line 158 of file SparseAnalysis.h.
|
inlineoverrideprotectedvirtual |
Get the lattice element for a value.
Implements llzk::dataflow::AbstractSparseForwardDataFlowAnalysis.
Definition at line 192 of file SparseAnalysis.h.
|
inlineprotected |
Get the lattice element for a value and create a dependency on the provided program point.
Definition at line 196 of file SparseAnalysis.h.
|
inlineprotected |
Definition at line 204 of file SparseAnalysis.h.
|
protectedpure virtual |
Set the given lattice element(s) at control flow entry point(s).
|
inlinevirtual |
Visit a call operation to an externally defined function given the lattices of its arguments.
Definition at line 169 of file SparseAnalysis.h.
|
inlinevirtual |
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.
the bounds of loops). By default, this method marks all such lattice elements as having reached a pessimistic fixpoint. firstIndex is the index of the first element of argLattices that is set by control-flow.
Definition at line 182 of file SparseAnalysis.h.
|
pure virtual |
Visit an operation with the lattices of its operands.
This function is expected to set the lattices of the operation's results.
Implemented in llzk::IntervalDataFlowAnalysis.