LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::ConstraintDependencyGraphStructAnalysis Class Reference

An analysis wrapper around the ConstraintDependencyGraph for a given struct. More...

#include <ConstraintDependencyGraph.h>

Inheritance diagram for llzk::ConstraintDependencyGraphStructAnalysis:
[legend]
Collaboration diagram for llzk::ConstraintDependencyGraphStructAnalysis:
[legend]

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.
 
- Public Member Functions inherited from llzk::StructAnalysis< ConstraintDependencyGraph, NoContext >
 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 ConstraintDependencyGraphgetResult () const
 Access the result iff it has been created.
 

Additional Inherited Members

- Protected Member Functions inherited from llzk::StructAnalysis< ConstraintDependencyGraph, NoContext >
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.
 

Detailed Description

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.

Member Function Documentation

◆ runAnalysis() [1/2]

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.

◆ runAnalysis() [2/2]

mlir::LogicalResult llzk::ConstraintDependencyGraphStructAnalysis::runAnalysis ( mlir::DataFlowSolver & solver,
mlir::AnalysisManager & moduleAnalysisManager,
NoContext & ctx )
inlineoverridevirtual

Perform the analysis and construct the Result output.

Parameters
solverThe pre-configured dataflow solver. This solver should already have a liveness analysis run, otherwise this analysis may be a no-op.
moduleAnalysisManagerThe 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.
ctxThe Context given to the analysis. This is presumed to have been created by the StructAnalysis's parent ModuleAnalysis.
Returns
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.

◆ StructAnalysis()

llzk::StructAnalysis< Result, Context >::StructAnalysis ( mlir::Operation * op)
inline

Assert that this analysis is being run on a StructDefOp and initializes the analysis with the current StructDefOp and its parent ModuleOp.

Parameters
opThe presumed StructDefOp.

Definition at line 47 of file AnalysisWrappers.h.


The documentation for this class was generated from the following files: