|
LLZK 0.1.0
Veridise's ZK Language IR
|
LLZK: This class has been ported from the MLIR DenseAnalysis utilities to allow for the use of custom LLZK symbol lookup logic. More...
#include <SparseAnalysis.h>
Public Member Functions | |
| 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 | |
| AbstractSparseForwardDataFlowAnalysis (mlir::DataFlowSolver &solver) | |
| virtual mlir::LogicalResult | visitOperationImpl (mlir::Operation *op, mlir::ArrayRef< const AbstractSparseLattice * > operandLattices, mlir::ArrayRef< AbstractSparseLattice * > resultLattices)=0 |
| The operation transfer function. | |
| virtual void | visitExternalCallImpl (mlir::CallOpInterface call, mlir::ArrayRef< const AbstractSparseLattice * > argumentLattices, mlir::ArrayRef< AbstractSparseLattice * > resultLattices)=0 |
| The transfer function for calls to external functions. | |
| virtual void | visitNonControlFlowArgumentsImpl (mlir::Operation *op, const mlir::RegionSuccessor &successor, mlir::ArrayRef< AbstractSparseLattice * > argLattices, unsigned firstIndex)=0 |
| Given an operation with 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. | |
| virtual AbstractSparseLattice * | getLatticeElement (mlir::Value value)=0 |
| Get the lattice element of a value. | |
| 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. | |
Protected Attributes | |
| mlir::SymbolTableCollection | tables |
| LLZK: Added for use of symbol helper caching. | |
LLZK: This class has been ported from the MLIR DenseAnalysis utilities to allow for the use of custom LLZK symbol lookup logic.
The class has been left as unmodified as possible, with explicit comments added where modifications have been made.
Base class for sparse forward data-flow analyses. A sparse analysis implements a transfer function on operations from the lattices of the operands to the lattices of the results. This analysis will propagate lattices across control-flow edges and the callgraph using liveness information.
Visit a program point in sparse forward data-flow analysis will invoke the transfer function of the operation preceding the program point iterator. Visit a program point at the begining of block will visit the block itself.
Definition at line 61 of file SparseAnalysis.h.
|
explicitprotected |
Definition at line 51 of file SparseAnalysis.cpp.
|
protectedpure virtual |
Get the lattice element of a value.
Implemented in llzk::dataflow::SparseForwardDataFlowAnalysis< StateT >, and llzk::dataflow::SparseForwardDataFlowAnalysis< IntervalAnalysisLattice >.
|
protected |
Get a read-only lattice element for a value and add it as a dependency to a program point.
Definition at line 346 of file SparseAnalysis.cpp.
|
override |
Initialize the analysis by visiting every owner of an SSA value: all operations and blocks.
Definition at line 56 of file SparseAnalysis.cpp.
|
protected |
Join the lattice element and propagate and update if it changed.
Definition at line 360 of file SparseAnalysis.cpp.
|
protected |
Definition at line 352 of file SparseAnalysis.cpp.
|
protectedpure virtual |
Set the given lattice element(s) at control flow entry point(s).
|
override |
Visit a program point.
If this is at beginning of block and all control-flow predecessors or callsites are known, then the arguments lattices are propagated from them. If this is after call operation or an operation with region control-flow, then its result lattices are set accordingly. Otherwise, the operation transfer function is invoked.
Definition at line 94 of file SparseAnalysis.cpp.
|
protectedpure virtual |
The transfer function for calls to external functions.
|
protectedpure virtual |
Given an operation with 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).
|
protectedpure virtual |
The operation transfer function.
Given the operand lattices, this function is expected to set the result lattices.
|
protected |
LLZK: Added for use of symbol helper caching.
Definition at line 114 of file SparseAnalysis.h.