[flang-commits] [flang] 5a580bb - [flang] Add the Runtime.h to prepare for more code being upstreamed.

Eric Schweitz via flang-commits flang-commits at lists.llvm.org
Wed Jul 1 13:26:48 PDT 2020


Author: Eric Schweitz
Date: 2020-07-01T13:26:36-07:00
New Revision: 5a580bbb818737dcbfcfc2089532c38b670ef204

URL: https://github.com/llvm/llvm-project/commit/5a580bbb818737dcbfcfc2089532c38b670ef204
DIFF: https://github.com/llvm/llvm-project/commit/5a580bbb818737dcbfcfc2089532c38b670ef204.diff

LOG: [flang] Add the Runtime.h to prepare for more code being upstreamed.

This is the header file for lowering Fortran statements that depend on
the Fortran runtime support library. The implementation of the lowering
of these constructs will follow in a subsequent diff.

Differential revision: https://reviews.llvm.org/D82991

Added: 
    flang/include/flang/Lower/Runtime.h

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Lower/Runtime.h b/flang/include/flang/Lower/Runtime.h
new file mode 100644
index 000000000000..dcfce8ff63c3
--- /dev/null
+++ b/flang/include/flang/Lower/Runtime.h
@@ -0,0 +1,57 @@
+//===-- Lower/Runtime.h -- Fortran runtime codegen interface ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Builder routines for constructing the FIR dialect of MLIR. As FIR is a
+// dialect of MLIR, it makes extensive use of MLIR interfaces and MLIR's coding
+// style (https://mlir.llvm.org/getting_started/DeveloperGuide/) is used in this
+// module.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef FORTRAN_LOWER_RUNTIME_H
+#define FORTRAN_LOWER_RUNTIME_H
+
+namespace Fortran {
+
+namespace parser {
+struct EventPostStmt;
+struct EventWaitStmt;
+struct LockStmt;
+struct PauseStmt;
+struct StopStmt;
+struct SyncAllStmt;
+struct SyncImagesStmt;
+struct SyncMemoryStmt;
+struct SyncTeamStmt;
+struct UnlockStmt;
+} // namespace parser
+
+namespace lower {
+
+class AbstractConverter;
+
+// Lowering of Fortran statement related runtime (other than IO and maths)
+
+void genEventPostStatement(AbstractConverter &, const parser::EventPostStmt &);
+void genEventWaitStatement(AbstractConverter &, const parser::EventWaitStmt &);
+void genLockStatement(AbstractConverter &, const parser::LockStmt &);
+void genFailImageStatement(AbstractConverter &);
+void genStopStatement(AbstractConverter &, const parser::StopStmt &);
+void genSyncAllStatement(AbstractConverter &, const parser::SyncAllStmt &);
+void genSyncImagesStatement(AbstractConverter &,
+                            const parser::SyncImagesStmt &);
+void genSyncMemoryStatement(AbstractConverter &,
+                            const parser::SyncMemoryStmt &);
+void genSyncTeamStatement(AbstractConverter &, const parser::SyncTeamStmt &);
+void genUnlockStatement(AbstractConverter &, const parser::UnlockStmt &);
+void genPauseStatement(AbstractConverter &, const parser::PauseStmt &);
+
+} // namespace lower
+} // namespace Fortran
+
+#endif // FORTRAN_LOWER_RUNTIME_H


        


More information about the flang-commits mailing list