FLANG
FIROpenACCUtils.h
1//===- FIROpenACCUtils.h - FIR OpenACC Utilities ----------------*- 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 declares utility functions for FIR OpenACC support.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FORTRAN_OPTIMIZER_OPENACC_SUPPORT_FIROPENACCUTILS_H
14#define FORTRAN_OPTIMIZER_OPENACC_SUPPORT_FIROPENACCUTILS_H
15
16#include "mlir/Dialect/OpenACC/OpenACC.h"
17#include "mlir/IR/Value.h"
18#include <string>
19
20namespace fir {
21namespace acc {
22
29std::string getVariableName(mlir::Value v, bool preferDemangledName = true);
30
43std::string getRecipeName(mlir::acc::RecipeKind kind, mlir::Type type,
44 mlir::Value var = nullptr,
45 llvm::ArrayRef<mlir::Value> bounds = {},
46 mlir::acc::ReductionOperator reductionOp =
47 mlir::acc::ReductionOperator::AccNone);
48
52bool areAllBoundsConstant(llvm::ArrayRef<mlir::Value> bounds);
53
54} // namespace acc
55} // namespace fir
56
57#endif // FORTRAN_OPTIMIZER_OPENACC_SUPPORT_FIROPENACCUTILS_H
Definition AbstractConverter.h:34