LLZK
0.1.0
Veridise's ZK Language IR
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/DeadCodeAnalysis.h>
13
14
using namespace
mlir
;
15
16
using
Executable
= mlir::dataflow::Executable;
17
18
namespace
llzk::dataflow
{
19
20
void
markAllOpsAsLive
(DataFlowSolver &solver, Operation *top) {
21
for
(Region ®ion : top->getRegions()) {
22
for
(Block &block : region) {
23
ProgramPoint *point = solver.getProgramPointBefore(&block);
24
(void)solver.getOrCreateState<
Executable
>(point)->setToLive();
25
for
(Operation &oper : block) {
26
markAllOpsAsLive
(solver, &oper);
27
}
28
}
29
}
30
}
31
32
}
// namespace llzk::dataflow
Executable
mlir::dataflow::Executable Executable
Definition
AnalysisUtil.cpp:16
AnalysisUtil.h
llzk::dataflow
Definition
AnalysisUtil.cpp:18
llzk::dataflow::markAllOpsAsLive
void markAllOpsAsLive(DataFlowSolver &solver, Operation *top)
Definition
AnalysisUtil.cpp:20
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.