FLANG
FIROpenACCSupportAnalysis.h
1//===- FIROpenACCSupportAnalysis.h - FIR OpenACCSupport Analysis ----------===//
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 defines the FIR-specific implementation of OpenACCSupport analysis.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FORTRAN_OPTIMIZER_OPENACC_ANALYSIS_FIROPENACCSUPPORTANALYSIS_H
14#define FORTRAN_OPTIMIZER_OPENACC_ANALYSIS_FIROPENACCSUPPORTANALYSIS_H
15
16#include "mlir/Dialect/OpenACC/OpenACC.h"
17#include "mlir/IR/Operation.h"
18#include "mlir/IR/Region.h"
19#include "mlir/IR/Value.h"
20#include <string>
21
22namespace fir {
23namespace acc {
24
37class FIROpenACCSupportAnalysis {
38public:
39 FIROpenACCSupportAnalysis() = default;
40
41 std::string getVariableName(mlir::Value v);
42
43 std::string getRecipeName(mlir::acc::RecipeKind kind, mlir::Type type,
44 mlir::Value var);
45
46 mlir::InFlightDiagnostic emitNYI(mlir::Location loc,
47 const mlir::Twine &message);
48
49 bool isValidSymbolUse(mlir::Operation *user, mlir::SymbolRefAttr symbol,
50 mlir::Operation **definingOpPtr);
51
52 bool isValidValueUse(mlir::Value v, mlir::Region &region);
53};
54
55} // namespace acc
56} // namespace fir
57
58#endif // FORTRAN_OPTIMIZER_OPENACC_ANALYSIS_FIROPENACCSUPPORTANALYSIS_H
Definition AbstractConverter.h:37