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

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#include <optional>
20
21namespace mlir {
22class Location;
23class Value;
24} // namespace mlir
25
26namespace fir {
27class CharBoxValue;
28class FirOpBuilder;
29} // namespace fir
30
31namespace Fortran {
32
33namespace parser {
34struct EventPostStmt;
35struct EventWaitStmt;
36struct LockStmt;
37struct NotifyWaitStmt;
38struct PauseStmt;
39struct StopStmt;
40struct SyncAllStmt;
41struct SyncImagesStmt;
42struct SyncMemoryStmt;
43struct SyncTeamStmt;
44struct UnlockStmt;
45} // namespace parser
46
47namespace lower {
48
49class AbstractConverter;
50
51// Lowering of Fortran statement related runtime (other than IO and maths)
52
53void genNotifyWaitStatement(AbstractConverter &,
54 const parser::NotifyWaitStmt &);
55void genEventPostStatement(AbstractConverter &, const parser::EventPostStmt &);
56void genEventWaitStatement(AbstractConverter &, const parser::EventWaitStmt &);
57void genLockStatement(AbstractConverter &, const parser::LockStmt &);
58void genFailImageStatement(AbstractConverter &);
59void genStopStatement(AbstractConverter &, const parser::StopStmt &);
60void genSyncAllStatement(AbstractConverter &, const parser::SyncAllStmt &);
61void genSyncImagesStatement(AbstractConverter &,
62 const parser::SyncImagesStmt &);
63void genSyncMemoryStatement(AbstractConverter &,
64 const parser::SyncMemoryStmt &);
65void genSyncTeamStatement(AbstractConverter &, const parser::SyncTeamStmt &);
66void genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &);
67void genPauseStatement(AbstractConverter &, const parser::PauseStmt &);
68
69void genPointerAssociate(fir::FirOpBuilder &, mlir::Location,
70 mlir::Value pointer, mlir::Value target);
71void genPointerAssociateRemapping(fir::FirOpBuilder &, mlir::Location,
72 mlir::Value pointer, mlir::Value target,
73 mlir::Value bounds);
74void genPointerAssociateLowerBounds(fir::FirOpBuilder &, mlir::Location,
75 mlir::Value pointer, mlir::Value target,
76 mlir::Value lbounds);
77} // namespace lower
78} // namespace Fortran
79
80#endif // FORTRAN_LOWER_RUNTIME_H
81

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

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