-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Lower omp.workshare to other omp constructs
- Loading branch information
1 parent
4da93bb
commit 9a51b40
Showing
16 changed files
with
491 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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,4 @@ | ||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name FlangOpenMP) | ||
|
||
add_public_tablegen_target(FlangOpenMPPassesIncGen) |
This file contains 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,30 @@ | ||
//===- Passes.h - OpenMP pass entry points ----------------------*- 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This header declares OpenMP pass entry points. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef FORTRAN_OPTIMIZER_OPENMP_PASSES_H | ||
#define FORTRAN_OPTIMIZER_OPENMP_PASSES_H | ||
|
||
#include "mlir/Dialect/Func/IR/FuncOps.h" | ||
#include "mlir/Pass/Pass.h" | ||
#include "mlir/Pass/PassRegistry.h" | ||
#include <memory> | ||
|
||
namespace flangomp { | ||
#define GEN_PASS_DECL | ||
#define GEN_PASS_REGISTRATION | ||
#include "flang/Optimizer/OpenMP/Passes.h.inc" | ||
|
||
bool shouldUseWorkshareLowering(mlir::Operation *op); | ||
|
||
} // namespace flangomp | ||
|
||
#endif // FORTRAN_OPTIMIZER_OPENMP_PASSES_H |
This file contains 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,18 @@ | ||
//===-- Passes.td - HLFIR pass definition file -------------*- 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef FORTRAN_DIALECT_OPENMP_PASSES | ||
#define FORTRAN_DIALECT_OPENMP_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def LowerWorkshare : Pass<"lower-workshare"> { | ||
let summary = "Lower workshare construct"; | ||
} | ||
|
||
#endif //FORTRAN_DIALECT_OPENMP_PASSES |
This file contains 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 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 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 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 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,26 @@ | ||
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) | ||
|
||
add_flang_library(FlangOpenMPTransforms | ||
LowerWorkshare.cpp | ||
|
||
DEPENDS | ||
FIRDialect | ||
FlangOpenMPPassesIncGen | ||
${dialect_libs} | ||
|
||
LINK_LIBS | ||
FIRAnalysis | ||
FIRDialect | ||
FIRBuilder | ||
FIRDialectSupport | ||
FIRSupport | ||
FIRTransforms | ||
HLFIRDialect | ||
MLIRIR | ||
${dialect_libs} | ||
|
||
LINK_COMPONENTS | ||
AsmParser | ||
AsmPrinter | ||
Remarks | ||
) |
Oops, something went wrong.