1 //===-- Coarray.cpp -------------------------------------------------------===//
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 /// Implementation of the lowering of image related constructs and expressions.
10 /// Fortran images can form teams, communicate via coarrays, etc.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #include "flang/Lower/Coarray.h"
15 #include "SymbolMap.h"
16 #include "flang/Lower/AbstractConverter.h"
17 #include "flang/Lower/FIRBuilder.h"
18 #include "flang/Parser/parse-tree.h"
19 #include "flang/Semantics/expression.h"
20 
21 #undef TODO
22 #define TODO(MSG)                                                              \
23   {                                                                            \
24     mlir::emitError(converter.getCurrentLocation(), "not yet implemented")     \
25         << MSG;                                                                \
26     exit(1);                                                                   \
27   }
28 
29 //===----------------------------------------------------------------------===//
30 // TEAM statements and constructs
31 //===----------------------------------------------------------------------===//
32 
33 void Fortran::lower::genChangeTeamConstruct(
34     Fortran::lower::AbstractConverter &converter,
35     Fortran::lower::pft::Evaluation &,
36     const Fortran::parser::ChangeTeamConstruct &) {
37   TODO("CHANGE TEAM construct");
38 }
39 
40 void Fortran::lower::genChangeTeamStmt(
41     Fortran::lower::AbstractConverter &converter,
42     Fortran::lower::pft::Evaluation &,
43     const Fortran::parser::ChangeTeamStmt &) {
44   TODO("CHANGE TEAM stmt");
45 }
46 
47 void Fortran::lower::genEndChangeTeamStmt(
48     Fortran::lower::AbstractConverter &converter,
49     Fortran::lower::pft::Evaluation &,
50     const Fortran::parser::EndChangeTeamStmt &) {
51   TODO("END CHANGE TEAM");
52 }
53 
54 void Fortran::lower::genFormTeamStatement(
55     Fortran::lower::AbstractConverter &converter,
56     Fortran::lower::pft::Evaluation &, const Fortran::parser::FormTeamStmt &) {
57   TODO("FORM TEAM");
58 }
59 
60 //===----------------------------------------------------------------------===//
61 // COARRAY expressions
62 //===----------------------------------------------------------------------===//
63 
64 fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genAddr(
65     const Fortran::evaluate::CoarrayRef &expr) {
66   (void)symMap;
67   TODO("co-array address");
68 }
69 
70 fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genValue(
71     const Fortran::evaluate::CoarrayRef &expr) {
72   TODO("co-array value");
73 }
74