llvm/mlir/test/lib/Analysis/TestDataFlowFramework.cpp

//===- TestDataFlowFramework.cpp - Test data-flow analysis framework ------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "mlir/Analysis/DataFlowFramework.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Pass/Pass.h"
#include <optional>

usingnamespacemlir;

namespace {
/// This analysis state represents an integer that is XOR'd with other states.
class FooState : public AnalysisState {};

/// This analysis computes `FooState` across operations and control-flow edges.
/// If an op specifies a `foo` integer attribute, the contained value is XOR'd
/// with the value before the operation.
class FooAnalysis : public DataFlowAnalysis {};

struct TestFooAnalysisPass
    : public PassWrapper<TestFooAnalysisPass, OperationPass<func::FuncOp>> {};
} // namespace

LogicalResult FooAnalysis::initialize(Operation *top) {}

LogicalResult FooAnalysis::visit(ProgramPoint *point) {}

void FooAnalysis::visitBlock(Block *block) {}

void FooAnalysis::visitOperation(Operation *op) {}

void TestFooAnalysisPass::runOnOperation() {}

namespace mlir {
namespace test {
void registerTestFooAnalysisPass() {}
} // namespace test
} // namespace mlir