1 //===-- Lower/OpenMP.h -- lower Open MP directives --------------*- 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 // Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef FORTRAN_LOWER_OPENMP_H
14 #define FORTRAN_LOWER_OPENMP_H
15 
16 #include <cinttypes>
17 
18 namespace Fortran {
19 namespace parser {
20 struct OpenMPConstruct;
21 struct OpenMPDeclarativeConstruct;
22 struct OmpEndLoopDirective;
23 struct OmpClauseList;
24 } // namespace parser
25 
26 namespace lower {
27 
28 class AbstractConverter;
29 
30 namespace pft {
31 struct Evaluation;
32 struct Variable;
33 } // namespace pft
34 
35 void genOpenMPConstruct(AbstractConverter &, pft::Evaluation &,
36                         const parser::OpenMPConstruct &);
37 void genOpenMPDeclarativeConstruct(AbstractConverter &, pft::Evaluation &,
38                                    const parser::OpenMPDeclarativeConstruct &);
39 int64_t getCollapseValue(const Fortran::parser::OmpClauseList &clauseList);
40 void genThreadprivateOp(AbstractConverter &, const pft::Variable &);
41 void genOpenMPReduction(AbstractConverter &,
42                         const Fortran::parser::OmpClauseList &clauseList);
43 
44 } // namespace lower
45 } // namespace Fortran
46 
47 #endif // FORTRAN_LOWER_OPENMP_H
48