Skip to content

Commit 53a8458

Browse files
committed
Fixing some typo and renaming Corray.{h,cpp} into MultiImageFortran.{h,cpp}
1 parent 0e655bd commit 53a8458

File tree

9 files changed

+27
-22
lines changed

9 files changed

+27
-22
lines changed

flang/include/flang/Lower/Coarray.h renamed to flang/include/flang/Lower/MultiImageFortran.h

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- Lower/Coarray.h -- image related lowering ---------------*- C++ -*-===//
1+
//===-- Lower/MultiImageFortran.h -- image related lowering -----*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_LOWER_COARRAY_H
10-
#define FORTRAN_LOWER_COARRAY_H
9+
#ifndef FORTRAN_LOWER_MULTI_IMAGE_FORTRAN_H
10+
#define FORTRAN_LOWER_MULTI_IMAGE_FORTRAN_H
1111

1212
#include "flang/Lower/AbstractConverter.h"
1313
#include "flang/Optimizer/Builder/BoxValue.h"
@@ -33,6 +33,18 @@ namespace pft {
3333
struct Evaluation;
3434
} // namespace pft
3535

36+
//===----------------------------------------------------------------------===//
37+
// Synchronization
38+
//===----------------------------------------------------------------------===//
39+
40+
void genSyncAllStatement(AbstractConverter &, const parser::SyncAllStmt &);
41+
42+
void genSyncImagesStatement(AbstractConverter &,
43+
const parser::SyncImagesStmt &);
44+
void genSyncMemoryStatement(AbstractConverter &,
45+
const parser::SyncMemoryStmt &);
46+
void genSyncTeamStatement(AbstractConverter &, const parser::SyncTeamStmt &);
47+
3648
//===----------------------------------------------------------------------===//
3749
// TEAM constructs
3850
//===----------------------------------------------------------------------===//
@@ -75,4 +87,4 @@ class CoarrayExprHelper {
7587
} // namespace lower
7688
} // namespace Fortran
7789

78-
#endif // FORTRAN_LOWER_COARRAY_H
90+
#endif // FORTRAN_LOWER_MULTI_IMAGE_FORTRAN_H

flang/include/flang/Lower/Runtime.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ void genEventWaitStatement(AbstractConverter &, const parser::EventWaitStmt &);
5757
void genLockStatement(AbstractConverter &, const parser::LockStmt &);
5858
void genFailImageStatement(AbstractConverter &);
5959
void genStopStatement(AbstractConverter &, const parser::StopStmt &);
60-
void genSyncAllStatement(AbstractConverter &, const parser::SyncAllStmt &);
61-
void genSyncImagesStatement(AbstractConverter &,
62-
const parser::SyncImagesStmt &);
63-
void genSyncMemoryStatement(AbstractConverter &,
64-
const parser::SyncMemoryStmt &);
65-
void genSyncTeamStatement(AbstractConverter &, const parser::SyncTeamStmt &);
6660
void genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &);
6761
void genPauseStatement(AbstractConverter &, const parser::PauseStmt &);
6862

flang/include/flang/Optimizer/Dialect/MIF/MIFOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ def mif_ChangeTeamOp
372372
let skipDefaultBuilders = 1;
373373
let builders =
374374
[OpBuilder<(ins "mlir::Value":$team,
375-
CArg<"bool", "true">:$ensureTerminaison,
375+
CArg<"bool", "true">:$ensureTermination,
376376
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>,
377377
OpBuilder<(ins "mlir::Value":$team, "mlir::Value":$stat,
378-
"mlir::Value":$errmsg, CArg<"bool", "true">:$ensureTerminaison,
378+
"mlir::Value":$errmsg, CArg<"bool", "true">:$ensureTermination,
379379
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>];
380380

381381
let extraClassDeclaration = [{

flang/lib/Lower/Bridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "flang/Lower/Allocatable.h"
1616
#include "flang/Lower/CUDA.h"
1717
#include "flang/Lower/CallInterface.h"
18-
#include "flang/Lower/Coarray.h"
1918
#include "flang/Lower/ConvertCall.h"
2019
#include "flang/Lower/ConvertExpr.h"
2120
#include "flang/Lower/ConvertExprToHLFIR.h"
@@ -26,6 +25,7 @@
2625
#include "flang/Lower/IO.h"
2726
#include "flang/Lower/IterationSpace.h"
2827
#include "flang/Lower/Mangler.h"
28+
#include "flang/Lower/MultiImageFortran.h"
2929
#include "flang/Lower/OpenACC.h"
3030
#include "flang/Lower/OpenMP.h"
3131
#include "flang/Lower/PFTBuilder.h"

flang/lib/Lower/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ add_flang_library(FortranLower
55
Allocatable.cpp
66
Bridge.cpp
77
CallInterface.cpp
8-
Coarray.cpp
98
ComponentPath.cpp
109
ConvertArrayConstructor.cpp
1110
ConvertCall.cpp
@@ -23,6 +22,7 @@ add_flang_library(FortranLower
2322
IterationSpace.cpp
2423
LoweringOptions.cpp
2524
Mangler.cpp
25+
MultiImageFortran.cpp
2626
OpenACC.cpp
2727
OpenMP/Atomic.cpp
2828
OpenMP/ClauseProcessor.cpp

flang/lib/Lower/ConvertExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "flang/Lower/Bridge.h"
2020
#include "flang/Lower/BuiltinModules.h"
2121
#include "flang/Lower/CallInterface.h"
22-
#include "flang/Lower/Coarray.h"
2322
#include "flang/Lower/ComponentPath.h"
2423
#include "flang/Lower/ConvertCall.h"
2524
#include "flang/Lower/ConvertConstant.h"
@@ -28,6 +27,7 @@
2827
#include "flang/Lower/ConvertVariable.h"
2928
#include "flang/Lower/CustomIntrinsicCall.h"
3029
#include "flang/Lower/Mangler.h"
30+
#include "flang/Lower/MultiImageFortran.h"
3131
#include "flang/Lower/Runtime.h"
3232
#include "flang/Lower/Support/Utils.h"
3333
#include "flang/Optimizer/Builder/Character.h"
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- Coarray.cpp -------------------------------------------------------===//
1+
//===-- MultiImageFortran.cpp ---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,7 +11,7 @@
1111
///
1212
//===----------------------------------------------------------------------===//
1313

14-
#include "flang/Lower/Coarray.h"
14+
#include "flang/Lower/MultiImageFortran.h"
1515
#include "flang/Lower/AbstractConverter.h"
1616
#include "flang/Lower/SymbolMap.h"
1717
#include "flang/Optimizer/Builder/FIRBuilder.h"
@@ -68,8 +68,7 @@ void Fortran::lower::genChangeTeamStmt(
6868
const std::list<Fortran::parser::CoarrayAssociation> &coarrayAssocList =
6969
std::get<std::list<Fortran::parser::CoarrayAssociation>>(stmt.t);
7070
if (coarrayAssocList.size())
71-
mlir::emitWarning(loc,
72-
"Coarrays provided in the association list are ignored.");
71+
TODO(loc, "Coarrays provided in the association list.");
7372

7473
// Handle TEAM-VALUE
7574
const auto *teamExpr =

flang/test/Lower/MIF/get_team.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
! RUN: %flang_fc1 -emit-hlfir -fcoarray %s -o - | FileCheck %s --check-prefixes=COARRAY
22
! RUN: not %flang_fc1 -emit-hlfir %s 2>&1 | FileCheck %s --check-prefixes=NOCOARRAY
33

4-
program test_form_team
4+
program test_get_team
55
use, intrinsic :: iso_fortran_env, only: team_type, initial_team, current_team, parent_team
66
implicit none
77
! NOCOARRAY: Not yet implemented: Multi-image features are experimental and are disabled by default, use '-fcoarray' to enable.
@@ -24,5 +24,5 @@ program test_form_team
2424
! COARRAY: %[[RES:.*]] = mif.get_team level %[[VAL_N:.*]] : (i32) -> {{.*}}
2525
result_team = get_team(n)
2626

27-
end program test_form_team
27+
end program test_get_team
2828

flang/test/Lower/MIF/sync_team.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
program test_sync_team
55
use, intrinsic :: iso_fortran_env, only: team_type
66
implicit none
7-
! NOCOARRAY: Coarrays disabled, use '-fcoarray' to enable.
7+
! NOCOARRAY: Not yet implemented: Multi-image features are experimental and are disabled by default, use '-fcoarray' to enable.
88

99
integer sync_status
1010
character(len=128) :: error_message

0 commit comments

Comments
 (0)