1 //===-- Lower/Runtime.h -- Fortran runtime codegen interface ----*- 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 // Builder routines for constructing the FIR dialect of MLIR. As FIR is a 10 // dialect of MLIR, it makes extensive use of MLIR interfaces and MLIR's coding 11 // style (https://mlir.llvm.org/getting_started/DeveloperGuide/) is used in this 12 // module. 13 // 14 //===----------------------------------------------------------------------===// 15 16 #ifndef FORTRAN_LOWER_RUNTIME_H 17 #define FORTRAN_LOWER_RUNTIME_H 18 19 namespace Fortran { 20 21 namespace parser { 22 struct EventPostStmt; 23 struct EventWaitStmt; 24 struct LockStmt; 25 struct PauseStmt; 26 struct StopStmt; 27 struct SyncAllStmt; 28 struct SyncImagesStmt; 29 struct SyncMemoryStmt; 30 struct SyncTeamStmt; 31 struct UnlockStmt; 32 } // namespace parser 33 34 namespace lower { 35 36 class AbstractConverter; 37 38 // Lowering of Fortran statement related runtime (other than IO and maths) 39 40 void genEventPostStatement(AbstractConverter &, const parser::EventPostStmt &); 41 void genEventWaitStatement(AbstractConverter &, const parser::EventWaitStmt &); 42 void genLockStatement(AbstractConverter &, const parser::LockStmt &); 43 void genFailImageStatement(AbstractConverter &); 44 void genStopStatement(AbstractConverter &, const parser::StopStmt &); 45 void genSyncAllStatement(AbstractConverter &, const parser::SyncAllStmt &); 46 void genSyncImagesStatement(AbstractConverter &, 47 const parser::SyncImagesStmt &); 48 void genSyncMemoryStatement(AbstractConverter &, 49 const parser::SyncMemoryStmt &); 50 void genSyncTeamStatement(AbstractConverter &, const parser::SyncTeamStmt &); 51 void genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &); 52 void genPauseStatement(AbstractConverter &, const parser::PauseStmt &); 53 54 } // namespace lower 55 } // namespace Fortran 56 57 #endif // FORTRAN_LOWER_RUNTIME_H 58