Skip to content

Commit 3fef235

Browse files
committed
[DRAFT][flang] Dialect Multi-Image Fortran (MIF) operations
1 parent 01f9dff commit 3fef235

File tree

3 files changed

+864
-0
lines changed

3 files changed

+864
-0
lines changed

flang/include/flang/Optimizer/Dialect/FIRTypes.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,4 +676,8 @@ def AnyBoxedArray
676676
: TypeConstraint<And<[BoxOrClassType.predicate, IsArrayBoxPred]>,
677677
"any boxed array">;
678678

679+
def ArrayOrIntegerType : TypeConstraint<Or<[fir_SequenceType.predicate,
680+
AnyIntegerLike.predicate]>,
681+
"fir.array or any integer">;
682+
679683
#endif // FIR_DIALECT_FIR_TYPES
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//===-- MIFDialect.td - MIF dialect base definitions - tablegen ---------*-===//
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+
/// \file
10+
/// Definition of the Multi-Image Fortran (MIF) dialect
11+
///
12+
//===----------------------------------------------------------------------===//
13+
14+
#ifndef FORTRAN_DIALECT_MIF_MIFDIALECT
15+
#define FORTRAN_DIALECT_MIF_MIFDIALECT
16+
17+
include "mlir/IR/AttrTypeBase.td"
18+
include "mlir/IR/EnumAttr.td"
19+
include "mlir/IR/OpBase.td"
20+
21+
def MIFDialect : Dialect {
22+
let name = "mif";
23+
24+
let summary = "Multi-Image Fortran dialect";
25+
26+
let description = [{
27+
The "MIF" dialect is designed to contain the basic coarray operations
28+
in Fortran and all multi image operations as descibed in the standard.
29+
This includes synchronization operations, atomic operations,
30+
image queries, teams, criticals, etc. The MIF dialect operations use
31+
the FIR types and are tightly coupled with FIR and HLFIR.
32+
}];
33+
34+
let cppNamespace = "::mif";
35+
let dependentDialects = ["fir::FIROpsDialect"];
36+
}
37+
38+
#endif // FORTRAN_DIALECT_MIF_MIFDIALECT

0 commit comments

Comments
 (0)