-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[flang][Multi-Image] Moving Mutli-image lowering to PRIF into the MIF dialect #161179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JDPailleux
wants to merge
12
commits into
llvm:main
Choose a base branch
from
SiPearl:jdp/flang/first-mif-operations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cea2509
[flang] Defining bases of the MIF Dialect
JDPailleux 561f2c9
[flang][Multi-Image] Moving Mutli-image lowering to PRIF into the MIF…
JDPailleux bbf6263
Update flang/include/flang/Optimizer/Dialect/MIF/MIFOps.td
JDPailleux 82cc1c8
Update flang/lib/Optimizer/Dialect/MIF/MIFOps.cpp
JDPailleux 84aa9e5
Update flang/lib/Optimizer/Dialect/MIF/MIFOps.cpp
JDPailleux c621e2d
Applying feedback
JDPailleux 1856d35
Update flang/include/flang/Optimizer/Dialect/MIF/MIFDialect.h
JDPailleux 415642b
Update flang/include/flang/Optimizer/Dialect/MIF/MIFDialect.h
JDPailleux 59a8c9f
Update assemblyFormat
JDPailleux 5df2969
Remove useless comments header
JDPailleux 2e3f353
Adding MemRead memory effect + add verifier to CoBroadcastOp + code f…
JDPailleux ebad317
Removing memory effects on synchonrization ops
JDPailleux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//===- 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_MIF_H | ||
#define FORTRAN_OPTIMIZER_DIALECT_MIF_MIF_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" | ||
|
||
// #include "flang/Optimizer/Dialect/FIRAttr.h" | ||
// #include "flang/Optimizer/Dialect/FIRType.h" | ||
JDPailleux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
//===----------------------------------------------------------------------===// | ||
// MIFDialect | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "flang/Optimizer/Dialect/MIF/MIFDialect.h.inc" | ||
|
||
#endif // FORTRAN_OPTIMIZER_DIALECT_MIF_MIF_H | ||
JDPailleux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.