|
LLZK 0.1.0
Veridise's ZK Language IR
|
LLZK: This class has been ported so that it can inherit from our port of the AbstractDenseForwardDataFlowAnalysis above. More...
#include <DenseAnalysis.h>
Public Member Functions | |
| virtual mlir::LogicalResult | visitOperation (mlir::Operation *op, const LatticeT &before, LatticeT *after)=0 |
| Visit an operation with the dense lattice before its execution. | |
| virtual void | visitCallControlFlowTransfer (mlir::CallOpInterface call, CallControlFlowAction action, const LatticeT &before, LatticeT *after) |
| Hook for customizing the behavior of lattice propagation along the call control flow edges. | |
| virtual void | visitRegionBranchControlFlowTransfer (mlir::RegionBranchOpInterface branch, std::optional< unsigned > regionFrom, std::optional< unsigned > regionTo, const LatticeT &before, LatticeT *after) |
| Hook for customizing the behavior of lattice propagation along the control flow edges between regions and their parent op. | |
| Public Member Functions inherited from llzk::dataflow::AbstractDenseForwardDataFlowAnalysis | |
| mlir::LogicalResult | initialize (mlir::Operation *top) override |
| Initialize the analysis by visiting every program point whose execution may modify the program state; that is, every operation and block. | |
| mlir::LogicalResult | visit (mlir::ProgramPoint *point) override |
| Visit a program point that modifies the state of the program. | |
Protected Member Functions | |
| LatticeT * | getLattice (mlir::LatticeAnchor anchor) override |
| Get the dense lattice on this lattice anchor. | |
| virtual void | setToEntryState (LatticeT *lattice)=0 |
| Set the dense lattice at control flow entry point and propagate an update if it changed. | |
| void | setToEntryState (AbstractDenseLattice *lattice) override |
| Set the dense lattice at control flow entry point and propagate an update if it changed. | |
| mlir::LogicalResult | visitOperationImpl (mlir::Operation *op, const AbstractDenseLattice &before, AbstractDenseLattice *after) final |
| Type-erased wrappers that convert the abstract dense lattice to a derived lattice and invoke the virtual hooks operating on the derived lattice. | |
| void | visitCallControlFlowTransfer (mlir::CallOpInterface call, CallControlFlowAction action, const AbstractDenseLattice &before, AbstractDenseLattice *after) final |
| Propagate the dense lattice forward along the call control flow edge, which can be either entering or exiting the callee. | |
| void | visitRegionBranchControlFlowTransfer (mlir::RegionBranchOpInterface branch, std::optional< unsigned > regionFrom, std::optional< unsigned > regionTo, const AbstractDenseLattice &before, AbstractDenseLattice *after) final |
| Propagate the dense lattice forward along the control flow edge from regionFrom to regionTo regions of the branch operation. | |
| Protected Member Functions inherited from llzk::dataflow::AbstractDenseForwardDataFlowAnalysis | |
| const AbstractDenseLattice * | getLatticeFor (mlir::ProgramPoint *dependent, mlir::LatticeAnchor anchor) |
| Get the dense lattice on the given lattice anchor and add dependent as its dependency. | |
| void | join (AbstractDenseLattice *lhs, const AbstractDenseLattice &rhs) |
| Join a lattice with another and propagate an update if it changed. | |
| virtual mlir::LogicalResult | processOperation (mlir::Operation *op) |
| Visit an operation. | |
| void | visitRegionBranchOperation (mlir::ProgramPoint *point, mlir::RegionBranchOpInterface branch, AbstractDenseLattice *after) |
| Visit a program point within a region branch operation with predecessors in it. | |
Additional Inherited Members | |
| Protected Attributes inherited from llzk::dataflow::AbstractDenseForwardDataFlowAnalysis | |
| mlir::SymbolTableCollection | tables |
| LLZK: Added for use of symbol helper caching. | |
LLZK: This class has been ported so that it can inherit from our port of the AbstractDenseForwardDataFlowAnalysis above.
It is otherwise left unchanged.
A dense forward data-flow analysis for propagating lattices before and after the execution of every operation across the IR by implementing transfer functions for operations.
LatticeT is expected to be a subclass of AbstractDenseLattice.
Definition at line 191 of file DenseAnalysis.h.
|
inlineoverrideprotectedvirtual |
Get the dense lattice on this lattice anchor.
Implements llzk::dataflow::AbstractDenseForwardDataFlowAnalysis.
Definition at line 262 of file DenseAnalysis.h.
|
inlineoverrideprotectedvirtual |
Set the dense lattice at control flow entry point and propagate an update if it changed.
Implements llzk::dataflow::AbstractDenseForwardDataFlowAnalysis.
Definition at line 269 of file DenseAnalysis.h.
|
protectedpure virtual |
Set the dense lattice at control flow entry point and propagate an update if it changed.
Implemented in llzk::SourceRefAnalysis.
|
inlinefinalprotectedvirtual |
Propagate the dense lattice forward along the call control flow edge, which can be either entering or exiting the callee.
Default implementation for enter and exit callee actions just meets the states, meaning that operations implementing CallOpInterface don't have any effect on the lattice that isn't already expressed by the interface itself. Default implementation for the external callee action additionally sets the "after" lattice to the entry state.
Reimplemented from llzk::dataflow::AbstractDenseForwardDataFlowAnalysis.
Definition at line 282 of file DenseAnalysis.h.
|
inlinevirtual |
Hook for customizing the behavior of lattice propagation along the call control flow edges.
Two types of (forward) propagation are possible here:
Reimplemented in llzk::IntervalDataFlowAnalysis, and llzk::SourceRefAnalysis.
Definition at line 221 of file DenseAnalysis.h.
|
pure virtual |
Visit an operation with the dense lattice before its execution.
This function is expected to set the dense lattice after its execution and trigger change propagation in case of change.
Implemented in llzk::IntervalDataFlowAnalysis, and llzk::SourceRefAnalysis.
|
inlinefinalprotectedvirtual |
Type-erased wrappers that convert the abstract dense lattice to a derived lattice and invoke the virtual hooks operating on the derived lattice.
Implements llzk::dataflow::AbstractDenseForwardDataFlowAnalysis.
Definition at line 275 of file DenseAnalysis.h.
|
inlinefinalprotectedvirtual |
Propagate the dense lattice forward along the control flow edge from regionFrom to regionTo regions of the branch operation.
nullopt values correspond to control flow branches originating at or targeting the branch operation itself. Default implementation just joins the states, meaning that operations implementing RegionBranchOpInterface don't have any effect on the lattice that isn't already expressed by the interface itself.
Reimplemented from llzk::dataflow::AbstractDenseForwardDataFlowAnalysis.
Definition at line 290 of file DenseAnalysis.h.
|
inlinevirtual |
Hook for customizing the behavior of lattice propagation along the control flow edges between regions and their parent op.
The control flows from regionFrom to regionTo, both of which may be nullopt to indicate the parent op. The lattice is propagated forward along this edge. The lattices are as follows:
Definition at line 251 of file DenseAnalysis.h.