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
11
12#include <mlir/Analysis/DataFlow/DeadCodeAnalysis.h>
13
14using namespace mlir;
15
16using Executable = mlir::dataflow::Executable;
17
18namespace llzk::dataflow {
19
20void markAllOpsAsLive(DataFlowSolver &solver, Operation *top) {
21 for (Region &region : 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
mlir::dataflow::Executable Executable
void markAllOpsAsLive(DataFlowSolver &solver, Operation *top)