llvm/mlir/unittests/Pass/AnalysisManagerTest.cpp

//===- AnalysisManagerTest.cpp - AnalysisManager unit tests ---------------===//
//
// 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/Pass/AnalysisManager.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "gtest/gtest.h"

usingnamespacemlir;
usingnamespacemlir::detail;

namespace {
/// Minimal class definitions for two analyses.
struct MyAnalysis {};
struct OtherAnalysis {};
struct OpSpecificAnalysis {};

TEST(AnalysisManagerTest, FineGrainModuleAnalysisPreservation) {}

TEST(AnalysisManagerTest, FineGrainFunctionAnalysisPreservation) {}

TEST(AnalysisManagerTest, FineGrainChildFunctionAnalysisPreservation) {}

/// Test analyses with custom invalidation logic.
struct TestAnalysisSet {};

struct CustomInvalidatingAnalysis {};

TEST(AnalysisManagerTest, CustomInvalidation) {}

TEST(AnalysisManagerTest, OpSpecificAnalysis) {}

struct AnalysisWithDependency {};

TEST(AnalysisManagerTest, DependentAnalysis) {}

struct AnalysisWithNestedDependency {};

TEST(AnalysisManagerTest, NestedDependentAnalysis) {}

struct AnalysisWith2Ctors {};

TEST(AnalysisManagerTest, DependentAnalysis2Ctors) {}

} // namespace