xref: /llvm-project/flang/lib/Lower/Coarray.cpp (revision 5db4779c3f07b6f562339722c176fb58329652ac)
1bd2c3014SEric Schweitz //===-- Coarray.cpp -------------------------------------------------------===//
2bd2c3014SEric Schweitz //
3bd2c3014SEric Schweitz // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4bd2c3014SEric Schweitz // See https://llvm.org/LICENSE.txt for license information.
5bd2c3014SEric Schweitz // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6bd2c3014SEric Schweitz //
7bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
8bd2c3014SEric Schweitz ///
9bd2c3014SEric Schweitz /// Implementation of the lowering of image related constructs and expressions.
10bd2c3014SEric Schweitz /// Fortran images can form teams, communicate via coarrays, etc.
11bd2c3014SEric Schweitz ///
12bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
13bd2c3014SEric Schweitz 
14bd2c3014SEric Schweitz #include "flang/Lower/Coarray.h"
15bd2c3014SEric Schweitz #include "flang/Lower/AbstractConverter.h"
16e1a12767SValentin Clement #include "flang/Lower/SymbolMap.h"
178a0d0a3aSValentin Clement #include "flang/Optimizer/Builder/FIRBuilder.h"
185b66cc10SValentin Clement #include "flang/Optimizer/Builder/Todo.h"
19bd2c3014SEric Schweitz #include "flang/Parser/parse-tree.h"
20bd2c3014SEric Schweitz #include "flang/Semantics/expression.h"
21bd2c3014SEric Schweitz 
22bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
23bd2c3014SEric Schweitz // TEAM statements and constructs
24bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
25bd2c3014SEric Schweitz 
genChangeTeamConstruct(Fortran::lower::AbstractConverter & converter,Fortran::lower::pft::Evaluation &,const Fortran::parser::ChangeTeamConstruct &)26bd2c3014SEric Schweitz void Fortran::lower::genChangeTeamConstruct(
27bd2c3014SEric Schweitz     Fortran::lower::AbstractConverter &converter,
28bd2c3014SEric Schweitz     Fortran::lower::pft::Evaluation &,
29bd2c3014SEric Schweitz     const Fortran::parser::ChangeTeamConstruct &) {
30*5db4779cSPete Steinfeld   TODO(converter.getCurrentLocation(), "coarray: CHANGE TEAM construct");
31bd2c3014SEric Schweitz }
32bd2c3014SEric Schweitz 
genChangeTeamStmt(Fortran::lower::AbstractConverter & converter,Fortran::lower::pft::Evaluation &,const Fortran::parser::ChangeTeamStmt &)33bd2c3014SEric Schweitz void Fortran::lower::genChangeTeamStmt(
34bd2c3014SEric Schweitz     Fortran::lower::AbstractConverter &converter,
35bd2c3014SEric Schweitz     Fortran::lower::pft::Evaluation &,
36bd2c3014SEric Schweitz     const Fortran::parser::ChangeTeamStmt &) {
37*5db4779cSPete Steinfeld   TODO(converter.getCurrentLocation(), "coarray: CHANGE TEAM statement");
38bd2c3014SEric Schweitz }
39bd2c3014SEric Schweitz 
genEndChangeTeamStmt(Fortran::lower::AbstractConverter & converter,Fortran::lower::pft::Evaluation &,const Fortran::parser::EndChangeTeamStmt &)40bd2c3014SEric Schweitz void Fortran::lower::genEndChangeTeamStmt(
41bd2c3014SEric Schweitz     Fortran::lower::AbstractConverter &converter,
42bd2c3014SEric Schweitz     Fortran::lower::pft::Evaluation &,
43bd2c3014SEric Schweitz     const Fortran::parser::EndChangeTeamStmt &) {
44*5db4779cSPete Steinfeld   TODO(converter.getCurrentLocation(), "coarray: END CHANGE TEAM statement");
45bd2c3014SEric Schweitz }
46bd2c3014SEric Schweitz 
genFormTeamStatement(Fortran::lower::AbstractConverter & converter,Fortran::lower::pft::Evaluation &,const Fortran::parser::FormTeamStmt &)47bd2c3014SEric Schweitz void Fortran::lower::genFormTeamStatement(
48bd2c3014SEric Schweitz     Fortran::lower::AbstractConverter &converter,
49bd2c3014SEric Schweitz     Fortran::lower::pft::Evaluation &, const Fortran::parser::FormTeamStmt &) {
50*5db4779cSPete Steinfeld   TODO(converter.getCurrentLocation(), "coarray: FORM TEAM statement");
51bd2c3014SEric Schweitz }
52bd2c3014SEric Schweitz 
53bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
54bd2c3014SEric Schweitz // COARRAY expressions
55bd2c3014SEric Schweitz //===----------------------------------------------------------------------===//
56bd2c3014SEric Schweitz 
genAddr(const Fortran::evaluate::CoarrayRef & expr)57bd2c3014SEric Schweitz fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genAddr(
58bd2c3014SEric Schweitz     const Fortran::evaluate::CoarrayRef &expr) {
59bd2c3014SEric Schweitz   (void)symMap;
60836e34f7SValentin Clement   TODO(converter.getCurrentLocation(), "co-array address");
61bd2c3014SEric Schweitz }
62bd2c3014SEric Schweitz 
genValue(const Fortran::evaluate::CoarrayRef & expr)63bd2c3014SEric Schweitz fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genValue(
64bd2c3014SEric Schweitz     const Fortran::evaluate::CoarrayRef &expr) {
65836e34f7SValentin Clement   TODO(converter.getCurrentLocation(), "co-array value");
66bd2c3014SEric Schweitz }
67