LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
AnalysisUtil.cpp
Go to the documentation of this file.
1//===-- AnalysisUtil.cpp - Data-flow analysis utils -------------*- C++ -*-===//
2//
3// Part of the LLZK Project, under the Apache License v2.0.
4// See LICENSE.txt for license information.
5// Copyright 2025 Veridise Inc.
6// SPDX-License-Identifier: Apache-2.0
7//
8//===----------------------------------------------------------------------===//
9
11
12#include <mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h>
13#include <mlir/Analysis/DataFlow/DeadCodeAnalysis.h>
14
15using namespace mlir;
16
17using Executable = mlir::dataflow::Executable;
18
19namespace llzk::dataflow {
20
21void loadRequiredAnalyses(DataFlowSolver &solver) {
22 solver.load<mlir::dataflow::SparseConstantPropagation>();
23 solver.load<mlir::dataflow::DeadCodeAnalysis>();
24}
25
26LogicalResult loadAndRunRequiredAnalyses(DataFlowSolver &solver, Operation *op) {
28 return solver.initializeAndRun(op);
29}
30
31} // namespace llzk::dataflow
mlir::dataflow::Executable Executable
void loadRequiredAnalyses(DataFlowSolver &solver)
LogicalResult loadAndRunRequiredAnalyses(DataFlowSolver &solver, Operation *op)