Warning: This file is not a C or C++ file. It does not have highlighting.

1//===-- Lower/Coarray.h -- image related lowering ---------------*- 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_LOWER_COARRAY_H
10#define FORTRAN_LOWER_COARRAY_H
11
12#include "flang/Lower/AbstractConverter.h"
13#include "flang/Optimizer/Builder/BoxValue.h"
14
15namespace Fortran {
16
17namespace parser {
18struct ChangeTeamConstruct;
19struct ChangeTeamStmt;
20struct EndChangeTeamStmt;
21struct FormTeamStmt;
22} // namespace parser
23
24namespace evaluate {
25class CoarrayRef;
26} // namespace evaluate
27
28namespace lower {
29
30class SymMap;
31
32namespace pft {
33struct Evaluation;
34} // namespace pft
35
36//===----------------------------------------------------------------------===//
37// TEAM constructs
38//===----------------------------------------------------------------------===//
39
40void genChangeTeamConstruct(AbstractConverter &, pft::Evaluation &eval,
41 const parser::ChangeTeamConstruct &);
42void genChangeTeamStmt(AbstractConverter &, pft::Evaluation &eval,
43 const parser::ChangeTeamStmt &);
44void genEndChangeTeamStmt(AbstractConverter &, pft::Evaluation &eval,
45 const parser::EndChangeTeamStmt &);
46void genFormTeamStatement(AbstractConverter &, pft::Evaluation &eval,
47 const parser::FormTeamStmt &);
48
49//===----------------------------------------------------------------------===//
50// COARRAY expressions
51//===----------------------------------------------------------------------===//
52
53/// Coarray expression lowering helper. A coarray expression is expected to be
54/// lowered into runtime support calls. For example, expressions may use a
55/// message-passing runtime to access another image's data.
56class CoarrayExprHelper {
57public:
58 explicit CoarrayExprHelper(AbstractConverter &converter, mlir::Location loc,
59 SymMap &syms)
60 : converter{converter}, symMap{syms}, loc{loc} {}
61 CoarrayExprHelper(const CoarrayExprHelper &) = delete;
62
63 /// Generate the address of a co-array expression.
64 fir::ExtendedValue genAddr(const evaluate::CoarrayRef &expr);
65
66 /// Generate the value of a co-array expression.
67 fir::ExtendedValue genValue(const evaluate::CoarrayRef &expr);
68
69private:
70 AbstractConverter &converter;
71 SymMap &symMap;
72 mlir::Location loc;
73};
74
75} // namespace lower
76} // namespace Fortran
77
78#endif // FORTRAN_LOWER_COARRAY_H
79

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of flang/include/flang/Lower/Coarray.h