1//===- TestAliasAnalysis.h - MLIR Test Utility ------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file provides a common facility that can be reused for the
10// testing of various aliasing analyses
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_TEST_LIB_ANALYSIS_ALIASANALYSIS_H
15#define MLIR_TEST_LIB_ANALYSIS_ALIASANALYSIS_H
16
17#include "mlir/Analysis/AliasAnalysis.h"
18
19namespace mlir {
20namespace test {
21
22/// Print the result of an alias query.
23void printAliasResult(AliasResult result, Value lhs, Value rhs);
24void printModRefResult(ModRefResult result, Operation *op, Value location);
25
26struct TestAliasAnalysisBase {
27 void runAliasAnalysisOnOperation(Operation *op, AliasAnalysis &aliasAnalysis);
28};
29
30struct TestAliasAnalysisModRefBase {
31 void runAliasAnalysisOnOperation(Operation *op, AliasAnalysis &aliasAnalysis);
32};
33
34} // namespace test
35} // namespace mlir
36
37#endif // MLIR_TEST_LIB_ANALYSIS_ALIASANALYSIS_H
38

source code of mlir/test/lib/Analysis/TestAliasAnalysis.h