|
LLZK 0.1.0
Veridise's ZK Language IR
|
This is the base class for a dataflow analysis designed to run on a single struct (i.e., a single component). More...
#include <AnalysisWrappers.h>
Public Member Functions | |
| StructAnalysis (mlir::Operation *op) | |
| Assert that this analysis is being run on a StructDefOp and initializes the analysis with the current StructDefOp and its parent ModuleOp. | |
| virtual | ~StructAnalysis ()=default |
| virtual mlir::LogicalResult | runAnalysis (mlir::DataFlowSolver &solver, mlir::AnalysisManager &moduleAnalysisManager, const Context &ctx)=0 |
| Perform the analysis and construct the Result output. | |
| bool | constructed (const Context &ctx) const |
| Query if the analysis has constructed a Result object for the given Context. | |
| const Result & | getResult (const Context &ctx) const |
| Access the result iff it has been created for the given Context object ctx. | |
Protected Member Functions | |
| mlir::ModuleOp | getModule () const |
| Get the ModuleOp that is the parent of the StructDefOp that is under analysis. | |
| component::StructDefOp | getStruct () const |
| Get the current StructDefOp that is under analysis. | |
| void | setResult (const Context &ctx, Result &&r) |
| Initialize the final Result object. | |
This is the base class for a dataflow analysis designed to run on a single struct (i.e., a single component).
| Result | The output of the analysis. |
| Context | Any module-level information or configuration needed to run this analysis. |
Definition at line 42 of file AnalysisWrappers.h.
|
inline |
Assert that this analysis is being run on a StructDefOp and initializes the analysis with the current StructDefOp and its parent ModuleOp.
| op | The presumed StructDefOp. |
Definition at line 47 of file AnalysisWrappers.h.
|
virtualdefault |
|
inline |
Query if the analysis has constructed a Result object for the given Context.
Definition at line 80 of file AnalysisWrappers.h.
|
inlineprotected |
Get the ModuleOp that is the parent of the StructDefOp that is under analysis.
Definition at line 94 of file AnalysisWrappers.h.
|
inline |
Access the result iff it has been created for the given Context object ctx.
Definition at line 83 of file AnalysisWrappers.h.
|
inlineprotected |
Get the current StructDefOp that is under analysis.
Definition at line 97 of file AnalysisWrappers.h.
|
pure virtual |
Perform the analysis and construct the Result output.
| solver | The pre-configured dataflow solver. This solver should already have a liveness analysis run, otherwise this analysis may be a no-op. |
| moduleAnalysisManager | The analysis manager of the top-level module. By giving the struct analysis a reference to the module's analysis manager, we can query analyses of other structs by querying for a child analysis. Otherwise, a struct's analysis manager cannot query for the analyses of other operations unless they are nested within the struct. |
| ctx | The Context given to the analysis. This is presumed to have been created by the StructAnalysis's parent ModuleAnalysis. |
Implemented in llzk::ConstraintDependencyGraphStructAnalysis, and llzk::StructIntervalAnalysis.
|
inlineprotected |
Initialize the final Result object.
Definition at line 100 of file AnalysisWrappers.h.