https://github.com/skatrak commented:
This LGTM, I just have a question on a part of the patch that I wasn't able to
fully understand.
https://github.com/llvm/llvm-project/pull/81623
___
llvm-branch-commits mailing list
@@ -2865,53 +2865,45 @@ bool ClauseProcessor::processDepend(
llvm::SmallVectorImpl ) const {
fir::FirOpBuilder = converter.getFirOpBuilder();
- return findRepeatableClause(
- [&](const ClauseTy::Depend *dependClause,
+ return findRepeatableClause(
+
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/81623
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2639,54 +2641,50 @@ bool
ClauseProcessor::processFinal(Fortran::lower::StatementContext ,
}
bool ClauseProcessor::processHint(mlir::IntegerAttr ) const {
- if (auto *hintClause = findUniqueClause()) {
+ if (auto *clause = findUniqueClause()) {
fir::FirOpBuilder =
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/81622
___
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, LGTM.
https://github.com/llvm/llvm-project/pull/81622
___
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:
LGTM.
https://github.com/llvm/llvm-project/pull/81627
___
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:
LGTM, just small comments.
https://github.com/llvm/llvm-project/pull/81629
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -1278,14 +1278,15 @@ class DataSharingProcessor {
llvm::SetVector symbolsInNestedRegions;
llvm::SetVector symbolsInParentRegions;
Fortran::lower::AbstractConverter
+ Fortran::semantics::SemanticsContext
skatrak wrote:
Do we expect to need it
@@ -1384,30 +1386,28 @@ void DataSharingProcessor::copyLastPrivateSymbol(
}
void DataSharingProcessor::collectOmpObjectListSymbol(
-const Fortran::parser::OmpObjectList ,
+const omp::ObjectList ,
llvm::SetVector ) {
- for (const Fortran::parser::OmpObject :
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/81629
___
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! 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://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 ,
const Fortran::parser::OpenMPDeclarativeConstruct ) {
genOMP(converter, eval, omp);
skatrak wrote:
Nit: I guess the `symTable` argument
@@ -3358,14 +3396,17 @@ genOMP(Fortran::lower::AbstractConverter ,
.t);
// Currently only private/firstprivate clause is handled, and
// all privatization is done within `omp.section` operations.
+ symTable.pushScope();
skatrak wrote:
Why
@@ -110,6 +110,32 @@ static void gatherFuncAndVarSyms(
}
}
+static Fortran::lower::pft::Evaluation *
+getEvalPastCollapse(Fortran::lower::pft::Evaluation , int collapseValue) {
skatrak wrote:
Nit: I tend to read this function name as meaning "return the
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://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://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 ,
template
static void createBodyOfOp(
Op , Fortran::lower::AbstractConverter , mlir::Location ,
-Fortran::lower::pft::Evaluation ,
+Fortran::lower::pft::Evaluation , bool
@@ -2178,7 +2178,7 @@
createAndSetPrivatizedLoopVar(Fortran::lower::AbstractConverter ,
template
static void createBodyOfOp(
Op , Fortran::lower::AbstractConverter , mlir::Location ,
-Fortran::lower::pft::Evaluation ,
+Fortran::lower::pft::Evaluation , bool
@@ -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
@@ -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/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
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
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
@@ -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
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
skatrak wrote:
I'm planning to split this into a PR stack after landing #87365, since it's too
large to review. However, only the last commit of the stack will compile and
pass tests, so they all would have to land simultaneously. I'm open to
suggestions on how to best achieve this.
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/88909
This patch removes the LoopControl parsing/printing functions that are no
longer used after transitioning `omp.simdloop` and `omp.taskloop` into loop
wrapper operations.
>From
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/89214
This patch introduces minimal changes to the MLIR to LLVM IR translation of
omp.wsloop to support the loop wrapper approach.
There is `omp.loop_nest` related translation code that should be extracted and
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/89212
This patch makes changes to the `scf.parallel` to `omp.parallel` + `omp.wsloop`
lowering pass in order to introduce a nested `omp.loop_nest` as well, and to
follow the new loop wrapper role for `omp.wsloop`.
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/89211
This patch updates verifiers for `omp.ordered.region`, `omp.cancel` and
`omp.cancellation_point`, which check for a parent `omp.wsloop`.
After transitioning to a loop wrapper-based approach, the expected direct
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
@@ -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 =
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/87258
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -37,3 +37,29 @@ TEST(Composition, GetCompoundConstruct) {
Directive C6 = getCompoundConstruct({OMPD_parallel_for, OMPD_simd});
ASSERT_EQ(C6, OMPD_parallel_for_simd);
}
+
+TEST(Composition, IsLeafConstruct) {
+ ASSERT_TRUE(isLeafConstruct(OMPD_loop));
+
@@ -37,3 +37,29 @@ TEST(Composition, GetCompoundConstruct) {
Directive C6 = getCompoundConstruct({OMPD_parallel_for, OMPD_simd});
ASSERT_EQ(C6, OMPD_parallel_for_simd);
}
+
+TEST(Composition, IsLeafConstruct) {
+ ASSERT_TRUE(isLeafConstruct(OMPD_loop));
+
https://github.com/skatrak approved this pull request.
LGTM, just small comments. Thanks!
https://github.com/llvm/llvm-project/pull/87258
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82851
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1452,10 +1454,14 @@ def MapInfoOp : OpenMP_Op<"map.info",
[AttrSizedOperandSegments]> {
- `var_type`: The type of the variable to copy.
- `var_ptr_ptr`: Used when the variable copied is a member of a class,
structure
or derived type and refers to the
@@ -990,6 +990,77 @@ static void printMapClause(OpAsmPrinter , Operation *op,
}
}
+static ParseResult parseMembersIndex(OpAsmParser ,
+ DenseIntElementsAttr ) {
+ SmallVector values;
+ int64_t value;
+ int64_t shape[2] = {0, 0};
+
https://github.com/skatrak approved this pull request.
This LGTM, I just have some small nits. Thanks Andrew!
https://github.com/llvm/llvm-project/pull/82851
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -1466,6 +1472,8 @@ def MapInfoOp : OpenMP_Op<"map.info",
[AttrSizedOperandSegments]> {
- 'map_capture_type': Capture type for the variable e.g. this, byref,
byvalue, byvla
this can affect how the variable is lowered.
- `name`: Holds the name of variable as
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/82851
___
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/89104
___
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:
Thank you Krzysztof for working on this. I have a suggestion to simplify the
implementation quite a bit, but let me know if you have issues with it.
https://github.com/llvm/llvm-project/pull/89104
___
@@ -25,6 +25,43 @@ using namespace llvm::omp;
#define GEN_DIRECTIVES_IMPL
#include "llvm/Frontend/OpenMP/OMP.inc"
+static iterator_range::iterator>
+getFirstCompositeRange(iterator_range::iterator> Leafs) {
skatrak wrote:
My understanding is that there can
@@ -1452,10 +1454,14 @@ def MapInfoOp : OpenMP_Op<"map.info",
[AttrSizedOperandSegments]> {
- `var_type`: The type of the variable to copy.
- `var_ptr_ptr`: Used when the variable copied is a member of a class,
structure
or derived type and refers to the
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
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ 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
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ 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));
-
-
@@ -2186,6 +2261,9 @@ calculateBoundsOffset(LLVM::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. Important to
@@ -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
@@ -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
@@ -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
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ 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 =
@@ -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
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ 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));
-
-
@@ -2306,18 +2405,81 @@ static void processMapMembersWithParent(
llvm::OpenMPIRBuilder::DeviceInfoTy::None);
combinedInfo.Names.emplace_back(
LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
-
-
@@ -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 <
@@ -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
___
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ mlir::omp::MapInfoOp memberOp) {
+ auto *res = llvm::find(mapData.MapClause, memberOp);
+ assert(res !=
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)
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)
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 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)
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)
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/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
@@ -2081,6 +2083,79 @@ void collectMapDataFromMapOperands(MapInfoData ,
}
}
+static int getMapDataMemberIdx(MapInfoData ,
+ 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
@@ -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 =
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)
@@ -461,18 +461,51 @@ struct ParallelOpLowering : public
OpRewritePattern {
// Replace the loop.
{
OpBuilder::InsertionGuard allocaGuard(rewriter);
-auto loop = rewriter.create(
+// Create worksharing loop wrapper.
+auto wsloopOp =
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)
@@ -916,49 +916,50 @@ static LogicalResult inlineReductionCleanup(
static LogicalResult
convertOmpWsloop(Operation , llvm::IRBuilderBase ,
LLVM::ModuleTranslation ) {
- auto loop = cast(opInst);
- const bool isByRef = loop.getByref();
+ auto wsloopOp =
@@ -1008,33 +1009,34 @@ convertOmpWsloop(Operation , llvm::IRBuilderBase
,
auto bodyGen = [&](llvm::OpenMPIRBuilder::InsertPointTy ip, llvm::Value *iv)
{
// Make sure further conversions know about the induction variable.
moduleTranslation.mapValue(
-
@@ -379,14 +385,16 @@ llvm.func @body(i32)
// CHECK-LABEL: @test_omp_wsloop_static_defchunk
llvm.func @test_omp_wsloop_static_defchunk(%lb : i32, %ub : i32, %step : i32)
-> () {
- omp.wsloop schedule(static)
- for (%iv) : i32 = (%lb) to (%ub) step (%step) {
- // CHECK:
@@ -369,7 +369,9 @@ getDeclareTargetFunctionDevice(
static llvm::SmallVector
skatrak wrote:
Done. I also simplified it a bit, since the return value wasn't necessary.
https://github.com/llvm/llvm-project/pull/89215
@@ -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
@@ -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{},
+
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
@@ -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 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(
+
1 - 100 of 181 matches
Mail list logo