FLANG
OpenMP.h
1//===-- include/flang/Utils/OpenMP.h ----------------------------*- 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#ifndef FORTRAN_UTILS_OPENMP_H_
10#define FORTRAN_UTILS_OPENMP_H_
11
12#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
13
14namespace fir {
15class FirOpBuilder;
16} // namespace fir
17
18namespace Fortran::utils::openmp {
19// TODO We can probably move the stuff inside `Support/OpenMP-utils.h/.cpp` here
20// as well.
21
28mlir::omp::MapInfoOp createMapInfoOp(mlir::OpBuilder &builder,
29 mlir::Location loc, mlir::Value baseAddr, mlir::Value varPtrPtr,
30 llvm::StringRef name, llvm::ArrayRef<mlir::Value> bounds,
31 llvm::ArrayRef<mlir::Value> members, mlir::ArrayAttr membersIndex,
32 uint64_t mapType, mlir::omp::VariableCaptureKind mapCaptureType,
33 mlir::Type retTy, bool partialMap = false,
34 mlir::FlatSymbolRefAttr mapperId = mlir::FlatSymbolRefAttr());
35
47mlir::Value mapTemporaryValue(fir::FirOpBuilder &firOpBuilder,
48 mlir::omp::TargetOp targetOp, mlir::Value val,
49 llvm::StringRef name = "tmp.map");
50
59void cloneOrMapRegionOutsiders(
60 fir::FirOpBuilder &firOpBuilder, mlir::omp::TargetOp targetOp);
61} // namespace Fortran::utils::openmp
62
63#endif // FORTRAN_UTILS_OPENMP_H_
Definition FIRBuilder.h:55
Definition AbstractConverter.h:34