FLANG
Runtime.h
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
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 genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &);
61void genPauseStatement(AbstractConverter &, const parser::PauseStmt &);
62
63void genPointerAssociate(fir::FirOpBuilder &, mlir::Location,
64 mlir::Value pointer, mlir::Value target);
65void genPointerAssociateRemapping(fir::FirOpBuilder &, mlir::Location,
66 mlir::Value pointer, mlir::Value target,
67 mlir::Value bounds, bool isMonomorphic);
68void genPointerAssociateLowerBounds(fir::FirOpBuilder &, mlir::Location,
69 mlir::Value pointer, mlir::Value target,
70 mlir::Value lbounds);
71} // namespace lower
72} // namespace Fortran
73
74#endif // FORTRAN_LOWER_RUNTIME_H
Definition AbstractConverter.h:85
Definition BoxValue.h:77
Definition FIRBuilder.h:55
Definition ParserActions.h:24
Definition check-expression.h:19
Definition bit-population-count.h:20
Definition AbstractConverter.h:34
Definition AbstractConverter.h:29
Definition parse-tree.h:2582
Definition parse-tree.h:2596
Definition parse-tree.h:2622
Definition parse-tree.h:2550
Definition parse-tree.h:2542
Definition parse-tree.h:2560
Definition parse-tree.h:2573
Definition parse-tree.h:2632