MLIR  20.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  virtual ~LocalAliasAnalysis() = default;
27 
28  /// Given two values, return their aliasing behavior.
29  AliasResult alias(Value lhs, Value rhs);
30 
31  /// Return the modify-reference behavior of `op` on `location`.
32  ModRefResult getModRef(Operation *op, Value location);
33 
34 protected:
35  /// Given the two values, return their aliasing behavior.
36  virtual AliasResult aliasImpl(Value lhs, Value rhs);
37 };
38 } // namespace mlir
39 
40 #endif // MLIR_ANALYSIS_ALIASANALYSIS_LOCALALIASANALYSIS_H_
The possible results of an alias query.
Definition: AliasAnalysis.h:26
This class implements a local form of alias analysis that tries to identify the underlying values add...
virtual ~LocalAliasAnalysis()=default
ModRefResult getModRef(Operation *op, Value location)
Return the modify-reference behavior of op on location.
virtual AliasResult aliasImpl(Value lhs, Value rhs)
Given the two values, return their aliasing behavior.
AliasResult alias(Value lhs, Value rhs)
Given two values, return their aliasing behavior.
The possible results of whether a memory access modifies or references a memory location.
Definition: AliasAnalysis.h:90
Operation is the basic unit of execution within MLIR.
Definition: Operation.h:88
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:96
Include the generated interface declarations.