@@ -1086,8 +1086,9 @@ static void genTargetDataClauses(
// ordering.
// TODO: Perhaps create a user provideable compiler option that will
// re-introduce a hard-error rather than a warning in these cases.
- promoteNonCPtrUseDevicePtrArgsToUseDeviceAddr(clauseOps, useDevi
https://github.com/ergawy approved this pull request.
https://github.com/llvm/llvm-project/pull/92524
___
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/ergawy edited https://github.com/llvm/llvm-project/pull/96266
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -52,12 +52,22 @@ using DeclareTargetCapturePair =
struct OmpMapMemberIndicesData {
// The indices representing the component members placement in its derived
// type parents hierarchy.
- llvm::SmallVector memberPlacementIndices;
+ llvm::SmallVector> memberPlacementIndi
@@ -953,6 +954,22 @@ bool ClauseProcessor::processMap(
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+omp::ObjectList objectList = gatherObjects
@@ -52,12 +52,22 @@ using DeclareTargetCapturePair =
struct OmpMapMemberIndicesData {
ergawy wrote:
It would be nice to extend the doc for this `struct` with some examples where
each example consists of:
- some Fortran variable the user wants to map,
- and how
@@ -671,4 +672,51 @@ static inline bool isEqual(const Fortran::lower::SomeExpr
*x,
}
} // end namespace Fortran::lower
+// OpenMP utility functions used in locations outside of the
+// OpenMP lowering.
+namespace Fortran::lower::omp {
+
+[[maybe_unused]] static void fillMembe
@@ -671,4 +672,51 @@ static inline bool isEqual(const Fortran::lower::SomeExpr
*x,
}
} // end namespace Fortran::lower
+// OpenMP utility functions used in locations outside of the
+// OpenMP lowering.
+namespace Fortran::lower::omp {
+
+[[maybe_unused]] static void fillMembe
@@ -30,17 +30,17 @@ subroutine mapType_array
!$omp end target
end subroutine mapType_array
-!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [3 x i64] [i64
0, i64 24, i64 4]
-!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [3 x i64]
[i64 32, i
https://github.com/ergawy commented:
Thanks for the PR @agozillon. I did a first round of review and a few
suggestions. I also have a few questions that might be obvious, so please
excuse any newbie-like questions here :D.
https://github.com/llvm/llvm-project/pull/96266
___
@@ -671,4 +672,51 @@ static inline bool isEqual(const Fortran::lower::SomeExpr
*x,
}
} // end namespace Fortran::lower
+// OpenMP utility functions used in locations outside of the
+// OpenMP lowering.
+namespace Fortran::lower::omp {
+
+[[maybe_unused]] static void fillMembe
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -953,6 +954,22 @@ bool ClauseProcessor::processMap(
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+omp::ObjectList objectList = gatherObjects
@@ -189,85 +295,60 @@ generateMemberPlacementIndices(const Object &object,
indices = llvm::SmallVector{llvm::reverse(indices)};
}
-void addChildIndexAndMapToParent(
-const omp::Object &object,
-std::map> &parentMemberIndices,
-mlir::omp::MapInfoOp &mapOp, semanti
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/96266
___
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/ergawy edited https://github.com/llvm/llvm-project/pull/96266
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -51,21 +55,66 @@ class OMPMapInfoFinalizationPass
: public fir::impl::OMPMapInfoFinalizationPassBase<
OMPMapInfoFinalizationPass> {
- void genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
- fir::FirOpBuilder &builder,
-
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -85,67 +135,227 @@ class OMPMapInfoFinalizationPass
descriptor = alloca;
}
+return descriptor;
+ }
+
+ /// Simple function that will generate a FIR operation accessing
+ /// the descriptors base address (BoxOffsetOp) and then generate a
+ /// MapInfoOp for
@@ -85,67 +135,227 @@ class OMPMapInfoFinalizationPass
descriptor = alloca;
}
+return descriptor;
+ }
+
+ /// Simple function that will generate a FIR operation accessing
+ /// the descriptors base address (BoxOffsetOp) and then generate a
+ /// MapInfoOp for
@@ -85,67 +135,227 @@ class OMPMapInfoFinalizationPass
descriptor = alloca;
}
+return descriptor;
+ }
+
+ /// Simple function that will generate a FIR operation accessing
+ /// the descriptors base address (BoxOffsetOp) and then generate a
+ /// MapInfoOp for
@@ -219,6 +430,33 @@ class OMPMapInfoFinalizationPass
mapClauseOwner.getMapOperandsMutable().assign(newMapOps);
ergawy wrote:
Not part of the PR (sorry for the extra comments), but I have a feeling
something is not correct here. Doesn't this line overwrite
@@ -85,67 +135,227 @@ class OMPMapInfoFinalizationPass
descriptor = alloca;
}
+return descriptor;
+ }
+
+ /// Simple function that will generate a FIR operation accessing
+ /// the descriptors base address (BoxOffsetOp) and then generate a
+ /// MapInfoOp for
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/81511
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -49,14 +49,16 @@ using DeclareTargetCapturePair =
//===--===//
static Fortran::semantics::Symbol *
-getOmpObjectSymbol(const Fortran::parser::OmpObject &ompObject) {
+getOmpObjParentSymbol(const Fortran::p
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
https://github.com/ergawy commented:
Partially reviewed, will continue later.
Thanks Andrew, I am learning quite a bit from this PR.
https://github.com/llvm/llvm-project/pull/81511
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.or
@@ -72,6 +74,29 @@ getOmpObjectSymbol(const Fortran::parser::OmpObject
&ompObject) {
return sym;
}
+static Fortran::semantics::Symbol *
+getOmpObjectSymbol(const Fortran::parser::OmpObject &ompObject) {
ergawy wrote:
Instead of having this and the above fu
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -1906,8 +2036,22 @@ bool ClauseProcessor::processMap(
for (const Fortran::parser::OmpObject &ompObject :
std::get(mapClause->v.t).v) {
+ llvm::omp::OpenMPOffloadMappingFlags objectsMapTypeBits =
mapTypeBits;
+ checkAndApplyDeclTargetM
@@ -0,0 +1,262 @@
+//===- 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
@@ -1859,7 +1983,13 @@ bool ClauseProcessor::processMap(
llvm::SmallVectorImpl *mapSymbols)
const {
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
- return findRepeatableClause(
+
+ llvm::SmallVector memberMaps;
+ llvm::SmallVector memberPlacementIn
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -0,0 +1,262 @@
+//===- 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
@@ -1841,14 +1867,112 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
llvm::cast(retTy).getElementType());
mlir::omp::MapInfoOp op = builder.create(
- loc, retTy, baseAddr, varType, varPtrPtr, members, bounds,
+ loc, retTy, baseAddr, varTy
@@ -49,14 +49,16 @@ using DeclareTargetCapturePair =
//===--===//
static Fortran::semantics::Symbol *
-getOmpObjectSymbol(const Fortran::parser::OmpObject &ompObject) {
+getOmpObjParentSymbol(const Fortran::p
@@ -0,0 +1,262 @@
+//===- 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
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/81511
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,262 @@
+//===- 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
https://github.com/ergawy commented:
I reviewed the entire PR and commented on all what I thought worth mentioning.
But I will leave the approval to people working on this longer than I am.
Hopefully my review makes other reviewers go over the PR faster.
One comment about the lit tests in the
@@ -1859,7 +1983,13 @@ bool ClauseProcessor::processMap(
llvm::SmallVectorImpl *mapSymbols)
const {
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
- return findRepeatableClause(
+
+ llvm::SmallVector memberMaps;
+ llvm::SmallVector memberPlacementIn
@@ -1906,8 +2036,22 @@ bool ClauseProcessor::processMap(
for (const Fortran::parser::OmpObject &ompObject :
std::get(mapClause->v.t).v) {
+ llvm::omp::OpenMPOffloadMappingFlags objectsMapTypeBits =
mapTypeBits;
+ checkAndApplyDeclTargetM
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.s
https://github.com/ergawy approved this pull request.
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-commits
@@ -49,38 +51,95 @@ using DeclareTargetCapturePair =
// and index data when lowering OpenMP map clauses. Keeps track of the
// placement of the component in the derived type hierarchy it rests within,
// alongside the generated mlir::omp::MapInfoOp for the mapped component.
-st
@@ -145,11 +146,174 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
builder.getIntegerAttr(builder.getIntegerType(64, false), mapType),
builder.getAttr(mapCaptureType),
builder.getStringAttr(name), builder.getBoolAttr(partialMap));
-
ret
@@ -183,99 +347,69 @@ getComponentObject(std::optional object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl &indices,
-
https://github.com/ergawy commented:
Reviewed `Utils.h/.cpp`, submitting the current state of the review to prevent
double-reviews when possible.
https://github.com/llvm/llvm-project/pull/92
___
llvm-branch-commits mailing list
llvm-branch-commits
@@ -145,11 +146,174 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
builder.getIntegerAttr(builder.getIntegerType(64, false), mapType),
builder.getAttr(mapCaptureType),
builder.getStringAttr(name), builder.getBoolAttr(partialMap));
-
ret
@@ -145,11 +146,174 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
builder.getIntegerAttr(builder.getIntegerType(64, false), mapType),
builder.getAttr(mapCaptureType),
builder.getStringAttr(name), builder.getBoolAttr(partialMap));
-
ret
@@ -49,38 +51,95 @@ using DeclareTargetCapturePair =
// and index data when lowering OpenMP map clauses. Keeps track of the
// placement of the component in the derived type hierarchy it rests within,
// alongside the generated mlir::omp::MapInfoOp for the mapped component.
-st
@@ -183,99 +347,69 @@ getComponentObject(std::optional object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl &indices,
-
@@ -0,0 +1,161 @@
+!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
+
+!CHECK: %[[ALLOCA:.*]] = fir.alloca
!fir.type<_QFtest_derived_type_allocatable_map_operand_and_block_additionTone_layer{i:f32,scalar:!fir.box>,array_i:!fir.array<10xi32>,j:f32,array_j:!fir.box>>,k:
@@ -183,99 +347,69 @@ getComponentObject(std::optional object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl &indices,
-
@@ -183,99 +347,69 @@ getComponentObject(std::optional object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl &indices,
-
https://github.com/ergawy edited
https://github.com/llvm/llvm-project/pull/92
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -145,11 +146,174 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
builder.getIntegerAttr(builder.getIntegerType(64, false), mapType),
builder.getAttr(mapCaptureType),
builder.getStringAttr(name), builder.getBoolAttr(partialMap));
-
ret
@@ -145,11 +146,174 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
builder.getIntegerAttr(builder.getIntegerType(64, false), mapType),
builder.getAttr(mapCaptureType),
builder.getStringAttr(name), builder.getBoolAttr(partialMap));
-
ret
@@ -82,104 +132,188 @@ class MapInfoFinalizationPass
// perform an alloca and then store to it and retrieve the data from the
new
// alloca.
if (mlir::isa(descriptor.getType())) {
- // If we have already created a local allocation for this BoxType,
- // w
@@ -58,21 +67,62 @@ class MapInfoFinalizationPass
/*corresponding local alloca=*/fir::AllocaOp>
localBoxAllocas;
- void genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
- fir::FirOpBuilder &builder,
-
@@ -58,21 +67,62 @@ class MapInfoFinalizationPass
/*corresponding local alloca=*/fir::AllocaOp>
localBoxAllocas;
- void genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
- fir::FirOpBuilder &builder,
-
https://github.com/ergawy commented:
First round, just reading through some tests to make sure I understand the
effect of the changes. Will continue later. Thanks Andrew!
https://github.com/llvm/llvm-project/pull/92
___
llvm-branch-commits mailing
https://github.com/ergawy edited
https://github.com/llvm/llvm-project/pull/92
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,161 @@
+!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
+
+!CHECK: %[[ALLOCA:.*]] = fir.alloca
!fir.type<_QFtest_derived_type_allocatable_map_operand_and_block_additionTone_layer{i:f32,scalar:!fir.box>,array_i:!fir.array<10xi32>,j:f32,array_j:!fir.box>>,k:
@@ -0,0 +1,161 @@
+!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
ergawy wrote:
In the whole file, can you capture the names of longs types in FileCheck
variables and use the captured type names to improve readability and reduce
line lengths a bit
@@ -0,0 +1,161 @@
+!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
+
+!CHECK: %[[ALLOCA:.*]] = fir.alloca
!fir.type<_QFtest_derived_type_allocatable_map_operand_and_block_additionTone_layer{i:f32,scalar:!fir.box>,array_i:!fir.array<10xi32>,j:f32,array_j:!fir.box>>,k:
https://github.com/ergawy approved this pull request.
Thanks Andrew. Compared the new PR against my comments in the old one and seems
ok to me.
However, the PR is hge and I cannot claim I got every little detail of what
is going on, therefore, it would be better to wait for other approvals
https://github.com/ergawy approved this pull request.
Nice! LGTM!
https://github.com/llvm/llvm-project/pull/110015
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/ergawy commented:
Thanks Akash! Just a small comment!
https://github.com/llvm/llvm-project/pull/121005
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branc
@@ -186,6 +186,32 @@ struct MapInfoOpConversion : public
ConvertOpToLLVMPattern {
}
};
+struct DeclMapperOpConversion
ergawy wrote:
I think we can resue `MultiRegionOpConversion` and specialize `forwardOpAttrs`
for `DeclareMapperOp`, right?
https://githu
@@ -0,0 +1,23 @@
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %s -o - | FileCheck
%s
+program p
+ integer, parameter :: n = 256
+ type t1
+ integer :: x(256)
+ end type t1
+
+ !$omp declare mapper(xx : t1 :: nn) map(to: nn, nn%x)
+ !$omp declare mapp
@@ -970,6 +972,20 @@ void ClauseProcessor::processMapObjects(
}
}
+if (!mapperIdName.empty()) {
+ if (mapperIdName == "default") {
+auto &typeSpec = object.sym()->owner().IsDerivedType()
+ ? *object.sym()->owner().derivedT
@@ -1057,13 +1075,17 @@ bool ClauseProcessor::processMap(
"Support for iterator modifiers is not implemented yet");
}
if (mappers) {
- TODO(currentLocation,
- "Support for mapper modifiers is not implemented yet");
+ assert(mappers->size()
https://github.com/ergawy approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/120994
___
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/ergawy edited
https://github.com/llvm/llvm-project/pull/121005
___
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/ergawy edited
https://github.com/llvm/llvm-project/pull/124746
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3421,6 +3441,85 @@ static void genMapInfos(llvm::IRBuilderBase &builder,
}
}
+static llvm::Expected
+emitUserDefinedMapper(Operation *declMapperOp, llvm::IRBuilderBase &builder,
+ LLVM::ModuleTranslation &moduleTranslation);
+
+static llvm::Expected
https://github.com/ergawy edited
https://github.com/llvm/llvm-project/pull/124746
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3421,6 +3441,85 @@ static void genMapInfos(llvm::IRBuilderBase &builder,
}
}
+static llvm::Expected
+emitUserDefinedMapper(Operation *declMapperOp, llvm::IRBuilderBase &builder,
+ LLVM::ModuleTranslation &moduleTranslation);
+
+static llvm::Expected
https://github.com/ergawy edited
https://github.com/llvm/llvm-project/pull/124746
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2709,13 +2709,23 @@ getRefPtrIfDeclareTarget(mlir::Value value,
}
namespace {
+// Append customMappers information to existing MapInfosTy
+struct MapInfosTy : llvm::OpenMPIRBuilder::MapInfosTy {
+ SmallVector Mappers;
ergawy wrote:
I understand we cannot
https://github.com/ergawy edited
https://github.com/llvm/llvm-project/pull/124746
___
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/ergawy edited
https://github.com/llvm/llvm-project/pull/125307
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1730,6 +1730,126 @@ buildDependData(std::optional dependKinds,
OperandRange dependVars,
}
}
+static bool privatizerReadsSourceVariable(omp::PrivateClauseOp &priv) {
+ if (priv.getDataSharingType() == omp::DataSharingClauseType::FirstPrivate)
+return true;
+
+ Regi
https://github.com/ergawy commented:
Thanks Tom! I have a few comments. Not much of an expert when it comes to tasks
so I might have missed something worth noting.
https://github.com/llvm/llvm-project/pull/125307
___
llvm-branch-commits mailing list
l
1 - 100 of 289 matches
Mail list logo