FLANG
include
flang
Support
OpenMP-utils.h
1
//===-- include/flang/Support/OpenMP-utils.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_SUPPORT_OPENMP_UTILS_H_
10
#define FORTRAN_SUPPORT_OPENMP_UTILS_H_
11
12
#include "mlir/IR/Builders.h"
13
#include "mlir/IR/Value.h"
14
15
#include "llvm/ADT/ArrayRef.h"
16
#include "llvm/ADT/STLExtras.h"
17
18
namespace
Fortran::common::openmp {
21
struct
EntryBlockArgs
{
22
llvm::ArrayRef<mlir::Value>
hasDeviceAddrVars;
23
llvm::ArrayRef<mlir::Value>
hostEvalVars;
24
llvm::ArrayRef<mlir::Value>
inReductionVars;
25
llvm::ArrayRef<mlir::Value>
mapVars;
26
llvm::ArrayRef<mlir::Value>
privVars;
27
llvm::ArrayRef<mlir::Value>
reductionVars;
28
llvm::ArrayRef<mlir::Value>
taskReductionVars;
29
llvm::ArrayRef<mlir::Value>
useDeviceAddrVars;
30
llvm::ArrayRef<mlir::Value>
useDevicePtrVars;
31
32
auto
getVars()
const
{
33
return
llvm::concat<const mlir::Value>(hasDeviceAddrVars, hostEvalVars,
34
inReductionVars, mapVars, privVars, reductionVars, taskReductionVars,
35
useDeviceAddrVars, useDevicePtrVars);
36
}
37
};
38
46
mlir::Block *genEntryBlock(
47
mlir::OpBuilder &builder,
const
EntryBlockArgs
&args, mlir::Region ®ion);
48
}
// namespace Fortran::common::openmp
49
50
#endif
// FORTRAN_SUPPORT_OPENMP_UTILS_H_
llvm::ArrayRef
Definition
FIRType.h:103
Fortran::common::openmp::EntryBlockArgs
Definition
OpenMP-utils.h:21
Generated on
for FLANG by
1.14.0