|
LLZK 0.1.0
Veridise's ZK Language IR
|
Lazily-constructed reachability analysis. More...
#include <CallGraphAnalyses.h>
Public Member Functions | |
| CallGraphReachabilityAnalysis (mlir::Operation *, mlir::AnalysisManager &am) | |
| NOTE: the need for the mlir::Operation argument is a requirement of the mlir::getAnalysis method, which requires template types to define a constructor that either takes only an mlir::Operation* (as in the CallGraphAnalysis above) or the signature below. | |
| bool | isReachable (function::FuncDefOp &A, function::FuncDefOp &B) const |
| Returns whether B is reachable from A. | |
| const llzk::CallGraph & | getCallGraph () const |
Static Public Member Functions | |
| static bool | isInvalidated (const mlir::AnalysisManager::PreservedAnalyses &pa) |
Lazily-constructed reachability analysis.
Definition at line 46 of file CallGraphAnalyses.h.
| llzk::CallGraphReachabilityAnalysis::CallGraphReachabilityAnalysis | ( | mlir::Operation * | , |
| mlir::AnalysisManager & | am ) |
NOTE: the need for the mlir::Operation argument is a requirement of the mlir::getAnalysis method, which requires template types to define a constructor that either takes only an mlir::Operation* (as in the CallGraphAnalysis above) or the signature below.
See: https://github.com/llvm/llvm-project/blob/415cfaf339dc4383acd44248584bcc6376213c8d/mlir/include/mlir/Pass/AnalysisManager.h#L220-L234 https://mlir.llvm.org/docs/PassManagement/#querying-analyses
Definition at line 44 of file CallGraphAnalyses.cpp.
|
inline |
Definition at line 65 of file CallGraphAnalyses.h.
|
inlinestatic |
Definition at line 58 of file CallGraphAnalyses.h.
| bool llzk::CallGraphReachabilityAnalysis::isReachable | ( | function::FuncDefOp & | A, |
| function::FuncDefOp & | B ) const |
Returns whether B is reachable from A.
NOTE: This is a potential cause of performance issues, as some circuits may perform poorly for DFS. However, we don't have enough examples at this time to demonstrate such an issue, so we will stick with DFS for simplicity for now. If performance issues arise, it may be beneficial to switch to inverse DFS or a different algorithm entirely.
Definition at line 50 of file CallGraphAnalyses.cpp.