LLZK 0.1.0
Veridise's ZK Language IR
|
An analysis wrapper around the ConstraintDependencyGraph for a given struct. More...
#include <ConstraintDependencyGraph.h>
Public Member Functions | |
mlir::LogicalResult | runAnalysis (mlir::DataFlowSolver &solver, mlir::AnalysisManager &moduleAnalysisManager, NoContext &_) override |
Perform the analysis and construct the Result output. | |
mlir::LogicalResult | runAnalysis (mlir::DataFlowSolver &solver, mlir::AnalysisManager &moduleAnalysisManager) |
Construct a CDG, using the module's analysis manager to query ConstraintDependencyGraph objects for nested components. | |
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. | |
![]() | |
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. | |
bool | constructed () const |
Query if the analysis has constructed a Result object. | |
const ConstraintDependencyGraph & | getResult () const |
Access the result iff it has been created. | |
Additional Inherited Members | |
![]() | |
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 (ConstraintDependencyGraph &&r) |
Initialize the final Result object. | |
An analysis wrapper around the ConstraintDependencyGraph for a given struct.
This analysis is a StructDefOp-level analysis that should not be directly interacted with—rather, it is a utility used by the ConstraintDependencyGraphModuleAnalysis that helps use MLIR's AnalysisManager to cache dependencies for sub-components.
Definition at line 199 of file ConstraintDependencyGraph.h.
mlir::LogicalResult llzk::ConstraintDependencyGraphStructAnalysis::runAnalysis | ( | mlir::DataFlowSolver & | solver, |
mlir::AnalysisManager & | moduleAnalysisManager ) |
Construct a CDG, using the module's analysis manager to query ConstraintDependencyGraph objects for nested components.
Definition at line 533 of file ConstraintDependencyGraph.cpp.
|
inlineoverridevirtual |
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. Implements llzk::StructAnalysis< ConstraintDependencyGraph, NoContext >.
Definition at line 204 of file ConstraintDependencyGraph.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.