@@ -903,24 +908,39 @@ bool ClauseProcessor::processMap(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMapInfoOp(
+
@@ -185,7 +184,12 @@ template
bool ClauseProcessor::processMotionClauses(
skatrak wrote:
Not for this patch, but perhaps we should think about refactoring `processMap`
and `processMotionClauses` to avoid code duplication for those parts that are
shared betwee
@@ -903,24 +908,39 @@ bool ClauseProcessor::processMap(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMapInfoOp(
+
@@ -1177,10 +1178,11 @@ static void genTargetDataClauses(
llvm::SmallVectorImpl &useDeviceTypes,
llvm::SmallVectorImpl &useDeviceLocs,
llvm::SmallVectorImpl &useDeviceSyms) {
+ llvm::SmallVector mapSyms;
skatrak wrote:
Changes to this function can
@@ -218,17 +223,34 @@ bool ClauseProcessor::processMotionClauses(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMap
@@ -115,8 +115,7 @@ class ClauseProcessor {
bool processMap(
mlir::Location currentLocation, Fortran::lower::StatementContext
&stmtCtx,
mlir::omp::MapClauseOps &result,
- llvm::SmallVectorImpl *mapSyms =
- nullptr,
+ llvm::SmallVectorImpl *mapS
@@ -1664,7 +1667,7 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
mlir::Value mapOp = createMapInfoOp(
firOpBuilder, baseOp.getLoc(), baseOp, mlir::Value{}, name.str(),
-bounds, {},
+bounds, {}, mlir::DenseIntElementsAt
@@ -811,9 +811,10 @@ mlir::omp::MapInfoOp
createMapInfoOp(fir::FirOpBuilder &builder, mlir::Location loc,
skatrak wrote:
It looks like this function belongs in Utils.cpp, rather than here. I suppose
that change doesn't belong in this PR, but it's something to k
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
@@ -966,6 +966,7 @@ genBodyOfTargetOp(Fortran::lower::AbstractConverter
&converter,
mlir::Value mapOp = createMapInfoOp(
firOpBuilder, copyVal.getLoc(), copyVal, mlir::Value{}, name.str(),
bounds, llvm::SmallVector{},
+mlir::DenseInt
@@ -0,0 +1,260 @@
+//===- OMPMapInfoFinalization.cpp
+//---===//
+//
+// 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-Id
@@ -19,7 +19,7 @@
subroutine foo()
implicit none
-
+
skatrak wrote:
Nit: Accidental change?
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.or
@@ -903,24 +908,39 @@ bool ClauseProcessor::processMap(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMapInfoOp(
+
@@ -0,0 +1,260 @@
+//===- OMPMapInfoFinalization.cpp
+//---===//
+//
+// 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-Id
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
@@ -218,17 +223,34 @@ bool ClauseProcessor::processMotionClauses(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMap
https://github.com/skatrak commented:
Thank you Andrew, as usual I have a lot of nits but the overall approach seems
reasonable to me.
https://github.com/llvm/llvm-project/pull/82852
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82852
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// Fortran pointers and allocatables, the mapping of the pointed to
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allo
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
@@ -2306,18 +2405,81 @@ static void processMapMembersWithParent(
llvm::OpenMPIRBuilder::DeviceInfoTy::None);
combinedInfo.Names.emplace_back(
LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
-
-
combinedInfo.BasePointers.emplace_back(m
@@ -2186,6 +2261,9 @@ calculateBoundsOffset(LLVM::ModuleTranslation
&moduleTranslation,
// which is utilised in subsequent member mappings (by modifying there map type
// with it) to indicate that a member is part of this parent and should be
// treated by the runtime as such.
@@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// Fortran pointers and allocatables, the mapping of the pointed to
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allo
@@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// Fortran pointers and allocatables, the mapping of the pointed to
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allo
@@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// Fortran pointers and allocatables, the mapping of the pointed to
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allo
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
@@ -2210,42 +2287,68 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// Fortran pointers and allocatables, the mapping of the pointed to
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allo
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
@@ -2306,18 +2405,81 @@ static void processMapMembersWithParent(
llvm::OpenMPIRBuilder::DeviceInfoTy::None);
combinedInfo.Names.emplace_back(
LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
-
-
combinedInfo.BasePointers.emplace_back(m
@@ -2306,18 +2405,81 @@ static void processMapMembersWithParent(
llvm::OpenMPIRBuilder::DeviceInfoTy::None);
combinedInfo.Names.emplace_back(
LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
-
-
combinedInfo.BasePointers.emplace_back(m
@@ -2283,16 +2386,12 @@ static void processMapMembersWithParent(
for (auto mappedMembers : parentClause.getMembers()) {
auto memberClause =
mlir::dyn_cast(mappedMembers.getDefiningOp());
-int memberDataIdx = -1;
-for (size_t i = 0; i < mapData.MapClause.si
@@ -33,6 +33,8 @@
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include
+#include
+#include
skatrak wrote:
Maybe not needed if `std::iota` call is removed?
https://github.com/llvm/llvm-project/pull/82852
___
l
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
@@ -1977,9 +1977,10 @@ LogicalResult OrderedRegionOp::verify() {
if (getSimd())
return failure();
- if (auto container = (*this)->getParentOfType()) {
-if (!container.getOrderedValAttr() ||
-container.getOrderedValAttr().getInt() != 0)
+ if (auto loopOp = d
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82852
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89211
>From f9b14e37a6f437768c405291c064f541f0655b1c Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Wed, 17 Apr 2024 16:40:03 +0100
Subject: [PATCH 1/2] [MLIR][OpenMP] Update op verifiers dependent on
omp.wsloop (
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89212
>From fdee8cf17cd7d2dbdb6cf872574776f02e70be7c Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Thu, 18 Apr 2024 10:55:16 +0100
Subject: [PATCH 1/2] [MLIR][SCF] Update scf.parallel lowering to OpenMP (3/5)
Thi
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89214
>From 25dc3a45645ab2310606b2ab02346eed700c7f97 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Thu, 18 Apr 2024 11:07:10 +0100
Subject: [PATCH] [MLIR][OpenMP] Update omp.wsloop translation to LLVM IR (4/5)
Th
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89211
>From f9b14e37a6f437768c405291c064f541f0655b1c Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Wed, 17 Apr 2024 16:40:03 +0100
Subject: [PATCH 1/2] [MLIR][OpenMP] Update op verifiers dependent on
omp.wsloop (
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89212
>From fdee8cf17cd7d2dbdb6cf872574776f02e70be7c Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Thu, 18 Apr 2024 10:55:16 +0100
Subject: [PATCH 1/2] [MLIR][SCF] Update scf.parallel lowering to OpenMP (3/5)
Thi
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/89214
>From 25dc3a45645ab2310606b2ab02346eed700c7f97 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Thu, 18 Apr 2024 11:07:10 +0100
Subject: [PATCH] [MLIR][OpenMP] Update omp.wsloop translation to LLVM IR (4/5)
Th
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/89211
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/89214
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak approved this pull request.
Thank you, LGTM. Just a small comment.
https://github.com/llvm/llvm-project/pull/90087
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
@@ -87,6 +88,27 @@ mlir::Type getLoopVarType(Fortran::lower::AbstractConverter
&converter,
return converter.getFirOpBuilder().getIntegerType(loopVarTypeSize);
}
+Fortran::semantics::Symbol *
+getIterationVariableSymbol(const Fortran::lower::pft::Evaluation &eval) {
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/90087
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/90090
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-com
https://github.com/skatrak approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/90108
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-com
https://github.com/skatrak approved this pull request.
Thank you Andrew for addressing my concerns, LGTM
https://github.com/llvm/llvm-project/pull/82851
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-
https://github.com/skatrak deleted
https://github.com/llvm/llvm-project/pull/82852
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2122,6 +2124,66 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82852
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak approved this pull request.
Thank you Andrew for working on my suggestions. LGTM, I just have some minimal
nits, but there's no need for another review from me before merging this PR.
https://github.com/llvm/llvm-project/pull/82852
@@ -2122,6 +2124,66 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
@@ -0,0 +1,63 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// This test checks the offload sizes, map types and base pointers and pointers
+// provided to the OpenMP kernel argument structure are correct when lowering
+// to LLVM-IR from MLIR when performing ex
@@ -115,8 +115,7 @@ class ClauseProcessor {
bool processMap(
mlir::Location currentLocation, Fortran::lower::StatementContext
&stmtCtx,
mlir::omp::MapClauseOps &result,
- llvm::SmallVectorImpl *mapSyms =
- nullptr,
+ llvm::SmallVectorImpl *mapS
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak approved this pull request.
Thank you Andrew, you've addressed all my concerns so this LGTM.
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://list
@@ -97,7 +269,7 @@ getOmpObjectSymbol(const Fortran::parser::OmpObject
&ompObject) {
if (auto *arrayEle =
Fortran::parser::Unwrap(
designator)) {
- sym = GetFirstName(arrayEle->base).symbol;
+ sy
@@ -116,6 +119,216 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+mlir::omp::MapInfoOp
+createMapInfoOp(fir::FirOpBuilder &builder, mlir::Location loc,
+mlir::Value baseAddr, mlir::Value varPtrPtr, std::string name,
+
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+ .derivedTypeSpec
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/92519
Currently, OpenMP operations are defined independently of each other. However,
one property of the OpenMP specification is that many clauses can be applied to
multiple constructs.
Keeping the MLIR representatio
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/92521
This patch adds a new tablegen file for the OpenMP dialect containing the list
of clauses currently supported.
>From e1aa6cb890dfc8f7f03fade845cff45a163201ff Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: F
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/92524
This patch applies fixes after the updates to OpenMP clause operands, as well
as updating some tests that were impacted by changes to the ordering or
assembly format of some clauses in MLIR.
>From 522812fb43548
skatrak wrote:
> I like the idea, but also have some questions:
>
> 1. How does an operation definition look like with all its clauses
> defined? Does it have to be repeated for each operation supporting the same
> clause(s)?
You can see how things would look like in #92523, but I can cop
skatrak wrote:
Here's a link to the RFC about this proposal, with links to all related PRs:
https://discourse.llvm.org/t/rfc-clause-based-representation-of-openmp-dialect-operations/79053
https://github.com/llvm/llvm-project/pull/92519
___
llvm-branch
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/92521
>From 7466061b62bb48352696a3890898dcea56f7e509 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Fri, 17 May 2024 10:56:32 +0100
Subject: [PATCH] [MLIR][OpenMP] Add `OpenMP_Clause` tablegen definitions
This pat
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/92524
>From 3659909ba1e21e2a8364ee48c9c6c5b22ae4f8f5 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Fri, 17 May 2024 11:38:36 +0100
Subject: [PATCH] [Flang][OpenMP] Update flang with changes to the OpenMP
dialect
@@ -0,0 +1,1183 @@
+//=== OpenMPClauses.td - OpenMP dialect clause 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: A
https://github.com/skatrak commented:
Thanks Krzysztof! Just some small comments, but I like the approach.
https://github.com/llvm/llvm-project/pull/77758
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/77758
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3655,8 +3661,7 @@ void Fortran::lower::genOpenMPDeclarativeConstruct(
Fortran::lower::pft::Evaluation &eval,
const Fortran::parser::OpenMPDeclarativeConstruct &omp) {
genOMP(converter, eval, omp);
skatrak wrote:
Nit: I guess the `symTable` argume
@@ -3358,14 +3396,17 @@ genOMP(Fortran::lower::AbstractConverter &converter,
.t);
// Currently only private/firstprivate clause is handled, and
// all privatization is done within `omp.section` operations.
+ symTable.pushScope();
skatrak wrot
@@ -110,6 +110,32 @@ static void gatherFuncAndVarSyms(
}
}
+static Fortran::lower::pft::Evaluation *
+getEvalPastCollapse(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
skatrak wrote:
Nit: I tend to read this function name as meaning "return th
https://github.com/skatrak approved this pull request.
Thanks, LGTM!
https://github.com/llvm/llvm-project/pull/77759
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-com
https://github.com/skatrak commented:
I have just a couple of small comments, thank you again for this work!
https://github.com/llvm/llvm-project/pull/77760
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/77760
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2178,7 +2178,7 @@
createAndSetPrivatizedLoopVar(Fortran::lower::AbstractConverter &converter,
template
static void createBodyOfOp(
Op &op, Fortran::lower::AbstractConverter &converter, mlir::Location &loc,
-Fortran::lower::pft::Evaluation &eval,
+Fortran::lowe
@@ -2178,7 +2178,7 @@
createAndSetPrivatizedLoopVar(Fortran::lower::AbstractConverter &converter,
template
static void createBodyOfOp(
Op &op, Fortran::lower::AbstractConverter &converter, mlir::Location &loc,
-Fortran::lower::pft::Evaluation &eval,
+Fortran::lowe
@@ -2248,11 +2248,15 @@ static void createBodyOfOp(
if (clauses)
ClauseProcessor(converter, *clauses).processCopyin();
}
+
+ if (genNested)
+genNestedEvaluations(converter, eval);
}
static void genBodyOfTargetDataOp(
Fortran::lower::AbstractConverter &
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/77760
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/77761
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak commented:
Thanks Krzysztof! This looks ok to me, but I suggest waiting for approval from
a second reviewer.
https://github.com/llvm/llvm-project/pull/77761
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm
@@ -0,0 +1,19 @@
+! RUN: bbc -fopenmp -o - %s | FileCheck %s
+
+! Check that this test can be lowered successfully.
+! See https://github.com/llvm/llvm-project/issues/74348
+
+! CHECK-LABEL: func.func @_QPsb
+! CHECK: omp.parallel
skatrak wrote:
I think it would
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/78289
This patch forwards the target CPU and features information from the Flang
frontend to MLIR func.func operation attributes, which are later used to
populate the target_cpu and target_features llvm.func attribute
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/78291
This patch removes the omp.target module attribute, since the information it
held on the target CPU and features is available to each function as a function
attribute. Target outlining during the MLIR to LLVM IR
@@ -4290,6 +4291,18 @@ class FirConverter : public
Fortran::lower::AbstractConverter {
assert(blockId == 0 && "invalid blockId");
assert(activeConstructStack.empty() && "invalid construct stack state");
+// Set target_cpu and target_features attributes to be passe
skatrak wrote:
> Not for this patch, but would we need to add this info for all outlined
> functions?
I think it probably should, since otherwise there would be no target
information for the new functions.
https://github.com/llvm/llvm-project/pull/78291
___
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/80283
This patch adds support for forwarding the target-cpu and target-features
attributes to functions outlined in the OpenMPIRBuilder. This, in turn, results
in the addition of these attributes for functions created
https://github.com/skatrak approved this pull request.
Thank you, this LGTM.
https://github.com/llvm/llvm-project/pull/102524
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-b
https://github.com/skatrak approved this pull request.
Thanks for this work, it LGTM.
https://github.com/llvm/llvm-project/pull/102525
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/101444
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/skatrak approved this pull request.
Thank you, LGTM as well.
https://github.com/llvm/llvm-project/pull/101444
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llv
@@ -1272,6 +1272,15 @@ static void genTaskwaitClauses(lower::AbstractConverter
&converter,
loc, llvm::omp::Directive::OMPD_taskwait);
}
+static void genWorkshareClauses(lower::AbstractConverter &converter,
skatrak wrote:
Ultra-nit: Move below `genTeams
skatrak wrote:
> I am debating introducing a new operation workshare_loop_container which
> exists only to "contain" a omp.loop_nest between lowering an elemental to
> lowering the omp.workshare it is contained in.
>
> so we would have this state:
>
> ```
> omp.workshare {
> omp.workshare_l
201 - 300 of 645 matches
Mail list logo