Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions flang/include/flang/Optimizer/Builder/Runtime/Coarray.h

This file was deleted.

1 change: 1 addition & 0 deletions flang/include/flang/Optimizer/Dialect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_subdirectory(CUF)
add_subdirectory(FIRCG)
add_subdirectory(MIF)

# This replicates part of the add_mlir_dialect cmake function from MLIR that
# cannot be used her because it expects to be run inside MLIR directory which
Expand Down
3 changes: 3 additions & 0 deletions flang/include/flang/Optimizer/Dialect/FIRType.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class BaseBoxType : public mlir::Type {
/// Unwrap element type from fir.heap, fir.ptr and fir.array.
mlir::Type unwrapInnerType() const;

// Get the element type or the fir.array
mlir::Type getElementOrSequenceType() const;

/// Is this the box for an assumed rank?
bool isAssumedRank() const;

Expand Down
9 changes: 9 additions & 0 deletions flang/include/flang/Optimizer/Dialect/MIF/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(LLVM_TARGET_DEFINITIONS MIFDialect.td)
mlir_tablegen(MIFDialect.h.inc -gen-dialect-decls -dialect=mif)
mlir_tablegen(MIFDialect.cpp.inc -gen-dialect-defs -dialect=mif)

# Add Multi Image Fortran operations
set(LLVM_TARGET_DEFINITIONS MIFOps.td)
mlir_tablegen(MIFOps.h.inc -gen-op-decls)
mlir_tablegen(MIFOps.cpp.inc -gen-op-defs)
add_public_tablegen_target(MIFOpsIncGen)
28 changes: 28 additions & 0 deletions flang/include/flang/Optimizer/Dialect/MIF/MIFDialect.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//===-- MIF.h - MIF dialect ---------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

#ifndef FORTRAN_OPTIMIZER_DIALECT_MIF_MIFDIALECT_H
#define FORTRAN_OPTIMIZER_DIALECT_MIF_MIFDIALECT_H

#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Interfaces/VectorInterfaces.h"

//===----------------------------------------------------------------------===//
// MIFDialect
//===----------------------------------------------------------------------===//

#include "flang/Optimizer/Dialect/MIF/MIFDialect.h.inc"

#endif // FORTRAN_OPTIMIZER_DIALECT_MIF_MIFDIALECT_H
38 changes: 38 additions & 0 deletions flang/include/flang/Optimizer/Dialect/MIF/MIFDialect.td
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//===-- MIFDialect.td - MIF dialect base definitions - tablegen ---------*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Definition of the Multi-Image Fortran (MIF) dialect
///
//===----------------------------------------------------------------------===//

#ifndef FORTRAN_DIALECT_MIF_MIFDIALECT
#define FORTRAN_DIALECT_MIF_MIFDIALECT

include "mlir/IR/AttrTypeBase.td"
include "mlir/IR/EnumAttr.td"
include "mlir/IR/OpBase.td"

def MIFDialect : Dialect {
let name = "mif";

let summary = "Multi-Image Fortran dialect";

let description = [{
The "MIF" dialect is designed to contain the basic coarray operations
in Fortran and all multi image operations as descibed in the standard.
This includes synchronization operations, atomic operations,
image queries, teams, criticals, etc. The MIF dialect operations use
the FIR types and are tightly coupled with FIR and HLFIR.
}];

let cppNamespace = "::mif";
let dependentDialects = ["fir::FIROpsDialect"];
}

#endif // FORTRAN_DIALECT_MIF_MIFDIALECT
20 changes: 20 additions & 0 deletions flang/include/flang/Optimizer/Dialect/MIF/MIFOps.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- Optimizer/Dialect/MIF/MIFOps.h - MIF operations ---------*- 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
//
//===----------------------------------------------------------------------===//

#ifndef FORTRAN_OPTIMIZER_DIALECT_MIF_MIFOPS_H
#define FORTRAN_OPTIMIZER_DIALECT_MIF_MIFOPS_H

#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/Dialect/MIF/MIFDialect.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/OpDefinition.h"

#define GET_OP_CLASSES
#include "flang/Optimizer/Dialect/MIF/MIFOps.h.inc"

#endif // FORTRAN_OPTIMIZER_DIALECT_MIF_MIFOPS_H
Loading