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
10
#include "
llzk/Analysis/AnalysisUtil.h
"
11
12
#include <mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h>
13
#include <mlir/Analysis/DataFlow/DeadCodeAnalysis.h>
14
15
using namespace
mlir
;
16
17
using
Executable
= mlir::dataflow::Executable;
18
19
namespace
llzk::dataflow
{
20
21
void
loadRequiredAnalyses
(DataFlowSolver &solver) {
22
solver.load<mlir::dataflow::SparseConstantPropagation>();
23
solver.load<mlir::dataflow::DeadCodeAnalysis>();
24
}
25
26
LogicalResult
loadAndRunRequiredAnalyses
(DataFlowSolver &solver, Operation *op) {
27
loadRequiredAnalyses
(solver);
28
return
solver.initializeAndRun(op);
29
}
30
31
}
// namespace llzk::dataflow
Executable
mlir::dataflow::Executable Executable
Definition
AnalysisUtil.cpp:17
AnalysisUtil.h
llzk::dataflow
Definition
AnalysisUtil.cpp:19
llzk::dataflow::loadRequiredAnalyses
void loadRequiredAnalyses(DataFlowSolver &solver)
Definition
AnalysisUtil.cpp:21
llzk::dataflow::loadAndRunRequiredAnalyses
LogicalResult loadAndRunRequiredAnalyses(DataFlowSolver &solver, Operation *op)
Definition
AnalysisUtil.cpp:26
mlir
Definition
AnalysisPassEnums.h.inc:39
lib
Analysis
AnalysisUtil.cpp
Generated by
1.14.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.