//===- AliasAnalysis.cpp - Alias Analysis for MLIR ------------------------===// // // 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/AliasAnalysis.h" #include "mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h" #include "mlir/IR/Operation.h" #include "mlir/IR/Value.h" #include "mlir/Support/LLVM.h" #include <memory> usingnamespacemlir; //===----------------------------------------------------------------------===// // AliasResult //===----------------------------------------------------------------------===// /// Merge this alias result with `other` and return a new result that /// represents the conservative merge of both results. AliasResult AliasResult::merge(AliasResult other) const { … } void AliasResult::print(raw_ostream &os) const { … } //===----------------------------------------------------------------------===// // ModRefResult //===----------------------------------------------------------------------===// void ModRefResult::print(raw_ostream &os) const { … } //===----------------------------------------------------------------------===// // AliasAnalysis //===----------------------------------------------------------------------===// AliasAnalysis::AliasAnalysis(Operation *op) { … } AliasResult AliasAnalysis::alias(Value lhs, Value rhs) { … } ModRefResult AliasAnalysis::getModRef(Operation *op, Value location) { … }