MLIR  15.0.0git
LocalAliasAnalysis.h
Go to the documentation of this file.
1 //===- LocalAliasAnalysis.h - Local Stateless Alias Analysis ----*- 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 contains the implementation of a local stateless alias analysis.
10 // This analysis walks from the values being compared to determine their
11 // potential for aliasing.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef MLIR_ANALYSIS_ALIASANALYSIS_LOCALALIASANALYSIS_H_
16 #define MLIR_ANALYSIS_ALIASANALYSIS_LOCALALIASANALYSIS_H_
17 
19 
20 namespace mlir {
21 /// This class implements a local form of alias analysis that tries to identify
22 /// the underlying values addressed by each value and performs a few basic
23 /// checks to see if they alias.
25 public:
26  /// Given two values, return their aliasing behavior.
27  AliasResult alias(Value lhs, Value rhs);
28 
29  /// Return the modify-reference behavior of `op` on `location`.
30  ModRefResult getModRef(Operation *op, Value location);
31 };
32 } // namespace mlir
33 
34 #endif // MLIR_ANALYSIS_ALIASANALYSIS_LOCALALIASANALYSIS_H_
Include the generated interface declarations.
Operation is a basic unit of execution within MLIR.
Definition: Operation.h:28
The possible results of an alias query.
Definition: AliasAnalysis.h:26
The possible results of whether a memory access modifies or references a memory location.
Definition: AliasAnalysis.h:90
ModRefResult getModRef(Operation *op, Value location)
Return the modify-reference behavior of op on location.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:85
This class implements a local form of alias analysis that tries to identify the underlying values add...
AliasResult alias(Value lhs, Value rhs)
Given two values, return their aliasing behavior.