agozillon wrote:
I made a bit of a mistake not using SPR to land this PR series, so i've ended
up having to directly commit the PR, the associated commit for this PR can be
found here:
https://github.com/llvm/llvm-project/commit/435e850ba97ab567a14b6c84d2b27cadb771cb27
https://github.com/agozillon closed
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/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
agozillon wrote:
Thank you all very much for the reviews across the PR stack!
I believe I have enough acceptance for the PR stack to land now, with at least
two reviewers per PR. So I will seek to land this PR stack in the next few days
(on Thursday) I'll perform the final adjustments
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -97,7 +269,7 @@ getOmpObjectSymbol(const Fortran::parser::OmpObject
) {
if (auto *arrayEle =
Fortran::parser::Unwrap(
designator)) {
- sym = GetFirstName(arrayEle->base).symbol;
+ sym =
@@ -116,6 +119,216 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+mlir::omp::MapInfoOp
+createMapInfoOp(fir::FirOpBuilder , mlir::Location loc,
+mlir::Value baseAddr, mlir::Value varPtrPtr, std::string name,
+
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://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
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -115,8 +115,7 @@ class ClauseProcessor {
bool processMap(
mlir::Location currentLocation, Fortran::lower::StatementContext
,
mlir::omp::MapClauseOps ,
- llvm::SmallVectorImpl *mapSyms =
- nullptr,
+ llvm::SmallVectorImpl *mapSyms,
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/jsjodin approved this pull request.
LGTM
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
agozillon wrote:
Thanks for the review @jsjodin and @skatrak I've attempted to address both of
your comments in recent updates.
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/jsjodin commented:
Looks good, just some minor nits/comments.
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -88,6 +91,196 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+mlir::omp::MapInfoOp
+createMapInfoOp(fir::FirOpBuilder , mlir::Location loc,
+mlir::Value baseAddr, mlir::Value varPtrPtr, std::string name,
+
@@ -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.
+//
@@ -88,6 +91,196 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+mlir::omp::MapInfoOp
+createMapInfoOp(fir::FirOpBuilder , mlir::Location loc,
+mlir::Value baseAddr, mlir::Value varPtrPtr, std::string name,
+
@@ -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.
+//
@@ -218,17 +224,40 @@ 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 =
@@ -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.
+//
https://github.com/jsjodin 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
agozillon wrote:
Performed a rebase across the entire PR stack (my appologies, I forgot that
might make the review a little more irritating before I performed it), and made
an attempt to address all reviewer comments and where things didn't quite work
as expected left replies on the comments.
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -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.
+//
@@ -22,6 +22,10 @@ namespace fir {
class FirOpBuilder;
} // namespace fir
+namespace llvm::omp {
+enum class OpenMPOffloadMappingFlags : uint64_t;
+} // namespace llvm::omp
agozillon wrote:
It is no longer used! Thank you for pointing that out.
@@ -97,7 +269,7 @@ getOmpObjectSymbol(const Fortran::parser::OmpObject
) {
if (auto *arrayEle =
Fortran::parser::Unwrap(
designator)) {
- sym = GetFirstName(arrayEle->base).symbol;
+ sym =
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -115,8 +115,7 @@ class ClauseProcessor {
bool processMap(
mlir::Location currentLocation, Fortran::lower::StatementContext
,
mlir::omp::MapClauseOps ,
- llvm::SmallVectorImpl *mapSyms =
- nullptr,
+ llvm::SmallVectorImpl *mapSyms,
@@ -185,7 +184,12 @@ template
bool ClauseProcessor::processMotionClauses(
agozillon wrote:
I agree and have been thinking about it, as there isn't a whole lot of
dissimilarities, most changes to processMapClauses need replicated to
processMotionClauses and
@@ -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(
+
@@ -811,9 +811,10 @@ mlir::omp::MapInfoOp
createMapInfoOp(fir::FirOpBuilder , mlir::Location loc,
agozillon wrote:
I can move it :-) the implementation just seems to have missed the migration as
the declaration exists in the Utils header.
@@ -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.
+//
@@ -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
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -966,6 +966,7 @@ genBodyOfTargetOp(Fortran::lower::AbstractConverter
,
mlir::Value mapOp = createMapInfoOp(
firOpBuilder, copyVal.getLoc(), copyVal, mlir::Value{}, name.str(),
bounds, llvm::SmallVector{},
+
@@ -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.
+//
@@ -88,6 +91,175 @@ void gatherFuncAndVarSyms(
symbolAndClause.emplace_back(clause, *object.id());
}
+int getComponentPlacementInParent(
+const Fortran::semantics::Symbol *componentSym) {
+ const auto *derived =
+ componentSym->owner()
+
@@ -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 =
@@ -115,8 +115,7 @@ class ClauseProcessor {
bool processMap(
mlir::Location currentLocation, Fortran::lower::StatementContext
,
mlir::omp::MapClauseOps ,
- llvm::SmallVectorImpl *mapSyms =
- nullptr,
+ llvm::SmallVectorImpl *mapSyms,
@@ -1664,7 +1667,7 @@ genTargetOp(Fortran::lower::AbstractConverter ,
mlir::Value mapOp = createMapInfoOp(
firOpBuilder, baseOp.getLoc(), baseOp, mlir::Value{}, name.str(),
-bounds, {},
+bounds, {}, mlir::DenseIntElementsAttr{},
@@ -811,9 +811,10 @@ mlir::omp::MapInfoOp
createMapInfoOp(fir::FirOpBuilder , 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 keep in
@@ -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
@@ -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 ,
llvm::SmallVectorImpl ,
llvm::SmallVectorImpl ) {
+ llvm::SmallVector mapSyms;
skatrak wrote:
Changes to this function can probably be reverted if `mapSyms` is made
@@ -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 =
https://github.com/skatrak commented:
Thank you for all the work here Andrew, I've got some comments but they should
be relatively easy to address.
https://github.com/llvm/llvm-project/pull/82853
___
llvm-branch-commits mailing list
@@ -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(
+
@@ -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(
+
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/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
agozillon wrote:
Back from vacation, would very much love if a kind reviewer or two could please
allocate some time to review this PR stack so I can hopefully move it further
along in the next few weeks :-) Thank you ahead of time!
https://github.com/llvm/llvm-project/pull/82853
agozillon wrote:
Small ping for review of this PR stack if possible. I'll be away on vacation
for two and a half weeks, but it would be excellent to come back to review
comments on this PR stack that I can address and then make some forward
progress on. No rush obviously as there will be a 2
agozillon wrote:
Rebased the entire stack on recent upstream changes, there was quite a few
changes that meant some sizeable alterations to the Fortran lowering segment of
the PR stack, but otherwise it all went smoothly. However, please do point out
if you see anything out of the ordinary
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
agozillon wrote:
The current PR stack has been updated with the aims to extend support to
explicit derived type member mapping at arbitrary depths, and not just top
level member mapping. The change set is slightly different, primarily in the
sense that we now need to handle index generation
https://github.com/agozillon updated
https://github.com/llvm/llvm-project/pull/82853
>From 21b05eee943e4f1ad20fcd8f30bd14a0a3317db6 Mon Sep 17 00:00:00 2001
From: Andrew Gozillon
Date: Fri, 15 Mar 2024 14:13:30 -0500
Subject: [PATCH] update with minor tidying up
Created using spr 1.3.4
---
70 matches
Mail list logo