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 mlir::LogicalResult | runAnalysis (mlir::DataFlowSolver &solver, mlir::AnalysisManager &moduleAnalysisManager, Context &ctx)=0 |
Perform the analysis and construct the Result output. | |
bool | constructed () const |
Query if the analysis has constructed a Result object. | |
const Result & | getResult () const |
Access the result iff it has been created. | |
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 (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.
|
inline |
Query if the analysis has constructed a Result
object.
Definition at line 79 of file AnalysisWrappers.h.
|
inlineprotected |
Get the ModuleOp
that is the parent of the StructDefOp
that is under analysis.
Definition at line 89 of file AnalysisWrappers.h.
|
inline |
Access the result iff it has been created.
Definition at line 82 of file AnalysisWrappers.h.
|
inlineprotected |
Get the current StructDefOp
that is under analysis.
Definition at line 92 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. |
mlir::success()
if the analysis ran without errors, and a mlir::failure()
otherwise. Implemented in llzk::ConstraintDependencyGraphStructAnalysis, and llzk::StructIntervalAnalysis.
|
inlineprotected |
Initialize the final Result
object.
Definition at line 95 of file AnalysisWrappers.h.