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
19namespace mlir {
20class Location;
21class Value;
22} // namespace mlir
23
24namespace fir {
25class CharBoxValue;
26class FirOpBuilder;
27} // namespace fir
28
29namespace Fortran {
30
31namespace parser {
32struct EventPostStmt;
33struct EventWaitStmt;
34struct LockStmt;
35struct NotifyWaitStmt;
36struct PauseStmt;
37struct StopStmt;
38struct SyncAllStmt;
39struct SyncImagesStmt;
40struct SyncMemoryStmt;
41struct SyncTeamStmt;
42struct UnlockStmt;
43} // namespace parser
44
45namespace lower {
46
48
49// Lowering of Fortran statement related runtime (other than IO and maths)
50
51void genNotifyWaitStatement(AbstractConverter &,
52 const parser::NotifyWaitStmt &);
53void genEventPostStatement(AbstractConverter &, const parser::EventPostStmt &);
54void genEventWaitStatement(AbstractConverter &, const parser::EventWaitStmt &);
55void genLockStatement(AbstractConverter &, const parser::LockStmt &);
56void genFailImageStatement(AbstractConverter &);
57void genStopStatement(AbstractConverter &, const parser::StopStmt &);
58void genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &);
59void genPauseStatement(AbstractConverter &, const parser::PauseStmt &);
60
61void genPointerAssociate(fir::FirOpBuilder &, mlir::Location,
62 mlir::Value pointer, mlir::Value target);
63void genPointerAssociateRemapping(fir::FirOpBuilder &, mlir::Location,
64 mlir::Value pointer, mlir::Value target,
65 mlir::Value bounds, bool isMonomorphic);
66void genPointerAssociateLowerBounds(fir::FirOpBuilder &, mlir::Location,
67 mlir::Value pointer, mlir::Value target,
68 mlir::Value lbounds);
69} // namespace lower
70} // namespace Fortran
71
72#endif // FORTRAN_LOWER_RUNTIME_H
Definition AbstractConverter.h:87
Definition BoxValue.h:77
Definition FIRBuilder.h:59
Definition ParserActions.h:24
Definition check-expression.h:19
Definition bit-population-count.h:20
Definition AbstractConverter.h:37
Definition AbstractConverter.h:32
Definition parse-tree.h:2606
Definition parse-tree.h:2620
Definition parse-tree.h:2646
Definition parse-tree.h:2574
Definition parse-tree.h:2566
Definition parse-tree.h:2584
Definition parse-tree.h:2597
Definition parse-tree.h:2656