@@ -267,6 +267,24 @@ mlir::Block *fir::FirOpBuilder::getAllocaBlock() {
return getEntryBlock();
}
+static mlir::ArrayAttr makeI64ArrayAttr(llvm::ArrayRef values,
+mlir::MLIRContext *context) {
+ llvm::SmallVector attrs;
--
@@ -175,99 +271,63 @@ getComponentObject(std::optional object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl &indices,
-
@@ -280,75 +340,60 @@ void insertChildMapInfoIntoParent(
// precedes the children. An alternative, may be to do
// delayed generation of map info operations from the clauses and
// organize them first before generation.
- mapOp->moveAfter(indices.second.b
@@ -85,67 +138,187 @@ 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
@@ -267,6 +267,24 @@ mlir::Block *fir::FirOpBuilder::getAllocaBlock() {
return getEntryBlock();
}
+static mlir::ArrayAttr makeI64ArrayAttr(llvm::ArrayRef values,
+mlir::MLIRContext *context) {
+ llvm::SmallVector attrs;
+ for (auto &
@@ -85,67 +138,187 @@ 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 +138,187 @@ 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
@@ -237,26 +436,34 @@ class OMPMapInfoFinalizationPass
getOperation()->walk([&](mlir::omp::MapInfoOp op) {
// TODO: Currently only supports a single user for the MapInfoOp, this
- // is fine for the moment as the Fortran Frontend will generate a
- // new Ma
@@ -85,67 +138,187 @@ 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 +138,187 @@ 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 +138,187 @@ 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
@@ -216,31 +215,50 @@ bool
ClauseProcessor::processMotionClauses(lower::StatementContext &stmtCtx,
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+
https://github.com/skatrak commented:
Thanks Andrew for the updates to this patch. I gave it a fresh look and I've
got another set of comments, but they should be easy to address.
https://github.com/llvm/llvm-project/pull/96266
___
llvm-branch-commits
@@ -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/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
@@ -2639,54 +2641,50 @@ bool
ClauseProcessor::processFinal(Fortran::lower::StatementContext &stmtCtx,
}
bool ClauseProcessor::processHint(mlir::IntegerAttr &result) const {
- if (auto *hintClause = findUniqueClause()) {
+ if (auto *clause = findUniqueClause()) {
fir::F
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:
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
llvm-branch-commits@lists.llvm.
@@ -2865,53 +2865,45 @@ bool ClauseProcessor::processDepend(
llvm::SmallVectorImpl &dependOperands) const {
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
- return findRepeatableClause(
- [&](const ClauseTy::Depend *dependClause,
+ return findRepea
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
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
@@ -1278,14 +1278,15 @@ class DataSharingProcessor {
llvm::SetVector symbolsInNestedRegions;
llvm::SetVector symbolsInParentRegions;
Fortran::lower::AbstractConverter &converter;
+ Fortran::semantics::SemanticsContext &semaCtx;
skatrak wrote:
Do we expe
@@ -1384,30 +1386,28 @@ void DataSharingProcessor::copyLastPrivateSymbol(
}
void DataSharingProcessor::collectOmpObjectListSymbol(
-const Fortran::parser::OmpObjectList &ompObjectList,
+const omp::ObjectList &objects,
llvm::SetVector &symbolSet) {
- for (const Fo
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:
LGTM, just small comments.
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 approved this pull request.
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 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
@@ -28,9 +29,27 @@ namespace Fortran {
namespace lower {
namespace omp {
-void genObjectList(const Fortran::parser::OmpObjectList &objectList,
+void genObjectList(const ObjectList &objects,
Fortran::lower::AbstractConverter &converter,
l
https://github.com/skatrak approved this pull request.
Thank you for the clarification, LGTM.
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
https://github.com/skatrak commented:
Changes to the `ClauseProcessor` and OpenMP lowering look good to me, but I'm
not familiar enough with the mapping work and OpenACC lowering to comment on
these changes.
https://github.com/llvm/llvm-project/pull/81626
__
https://github.com/skatrak approved this pull request.
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 created
https://github.com/llvm/llvm-project/pull/86802
This patch updates Flang lowering to use the new set of OpenMP clause operand
structures and their groupings into directive-specific sets of clause operands.
It simplifies the passing of information from the cla
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/86802
>From 7af7e9d13fc2134e76bb532bfa4313aa3df17924 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Tue, 26 Mar 2024 16:46:56 +
Subject: [PATCH] [Flang][OpenMP][Lower] Use clause operand structures
This patch
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/87070
This patch simplifies the lowering from PFT to MLIR of OpenMP compound
constructs (i.e. combined and composite).
The new approach consists of iteratively processing the outermost leaf
construct of the given com
@@ -710,6 +710,81 @@ genOpenMPReduction(Fortran::lower::AbstractConverter
&converter,
}
}
+/// Split a combined directive into an outer leaf directive and the (possibly
+/// combined) rest of the combined directive. Composite directives and
+/// non-compound directives are
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/87232
This patch defines a common interface to be shared by all OpenMP loop wrapper
operations. The main restrictions these operations must meet in order to be
considered a wrapper are:
- They contain a single region
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/87239
This patch updates the definition of `omp.distribute` to enforce the
restrictions of a wrapper operation.
>From 4537071171506b17de3727800e3754e412c9a967 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Mon, 1
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/87253
This patch updates the definition of `omp.taskloop` to enforce the restrictions
of a wrapper operation.
>From daaf4f7fec79aeebf37b4a1d83d89d19904fb417 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Mon, 1 A
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/87086
___
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 Krzysztof, LGTM. I have a couple of suggestions, but this should be
ready if you don't agree with them.
https://github.com/llvm/llvm-project/pull/87086
___
llvm-branch-commits mailing li
@@ -597,14 +599,11 @@ static void removeStoreOp(mlir::Operation *reductionOp,
mlir::Value symVal) {
// TODO: Generate the reduction operation during lowering instead of creating
// and removing operations since this is not a robust approach. Also, removing
// ops in the builde
@@ -58,17 +58,15 @@ void gatherFuncAndVarSyms(
const ObjectList &objects, mlir::omp::DeclareTargetCaptureClause clause,
llvm::SmallVectorImpl &symbolAndClause);
+int64_t getCollapseValue(const List &clauses);
skatrak wrote:
It looks like this function
@@ -2357,44 +2332,44 @@ genOMP(Fortran::lower::AbstractConverter &converter,
converter.genLocation(beginBlockDirective.source);
const auto origDirective =
std::get(beginBlockDirective.t).v;
- const auto &beginClauseList =
- std::get(beginBlockDirective.t);
-
@@ -49,9 +49,8 @@ class ClauseProcessor {
public:
ClauseProcessor(Fortran::lower::AbstractConverter &converter,
Fortran::semantics::SemanticsContext &semaCtx,
- const Fortran::parser::OmpClauseList &clauses)
- : converter(converter), se
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/87247
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -8,12 +8,74 @@
#include "llvm/Frontend/OpenMP/OMP.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
+#includ
@@ -8,12 +8,74 @@
#include "llvm/Frontend/OpenMP/OMP.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
+#includ
@@ -0,0 +1,41 @@
+//===- llvm/unittests/Frontend/OpenMPComposeTest.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-Identifier: Apa
https://github.com/skatrak commented:
I think this looks reasonable if we want to both split a construct into leaf
constructs and also merge multiple constructs into a single compound one, if it
exists. I'm just wondering if we need that much flexibility (and complexity
associated with it).
I
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/87247
___
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, based on the current proposal in #87247 this LGTM. If that changes,
this will need another review.
https://github.com/llvm/llvm-project/pull/87258
___
llvm-branch-commits mailing list
l
@@ -69,6 +69,74 @@ def ReductionClauseInterface :
OpInterface<"ReductionClauseInterface"> {
];
}
+def LoopWrapperInterface : OpInterface<"LoopWrapperInterface"> {
+ let description = [{
+OpenMP operations that can wrap a single loop nest. When taking a wrapper
+rol
skatrak wrote:
Thank you @kparzysz for sharing your thoughts. I think it's a reasonable
solution, so it's fine by me. I'll leave it to someone more familiar with the
directive emitter to approve the PR though.
https://github.com/llvm/llvm-project/pull/87247
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/87232
>From 2452bc75a7f2efb67a0522bbe8b0e7ba5bc3365b Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Mon, 1 Apr 2024 13:04:14 +0100
Subject: [PATCH 1/2] [MLIR][OpenMP] Introduce the LoopWrapperInterface
This patch
@@ -69,6 +69,74 @@ def ReductionClauseInterface :
OpInterface<"ReductionClauseInterface"> {
];
}
+def LoopWrapperInterface : OpInterface<"LoopWrapperInterface"> {
+ let description = [{
+OpenMP operations that can wrap a single loop nest. When taking a wrapper
+rol
@@ -69,6 +69,74 @@ def ReductionClauseInterface :
OpInterface<"ReductionClauseInterface"> {
];
}
+def LoopWrapperInterface : OpInterface<"LoopWrapperInterface"> {
+ let description = [{
+OpenMP operations that can wrap a single loop nest. When taking a wrapper
+rol
@@ -1730,9 +1730,28 @@ LogicalResult LoopNestOp::verify() {
<< "range argument type does not match corresponding IV type";
}
+ auto wrapper =
+ llvm::dyn_cast_if_present((*this)->getParentOp());
+
+ if (!wrapper || !wrapper.isWrapper())
+return emitOp
@@ -69,6 +69,74 @@ def ReductionClauseInterface :
OpInterface<"ReductionClauseInterface"> {
];
}
+def LoopWrapperInterface : OpInterface<"LoopWrapperInterface"> {
+ let description = [{
+OpenMP operations that can wrap a single loop nest. When taking a wrapper
+rol
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/87239
>From 4537071171506b17de3727800e3754e412c9a967 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Mon, 1 Apr 2024 14:08:33 +0100
Subject: [PATCH] [MLIR][OpenMP] Make omp.distribute into a loop wrapper
This patch
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/87253
>From daaf4f7fec79aeebf37b4a1d83d89d19904fb417 Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Mon, 1 Apr 2024 17:05:38 +0100
Subject: [PATCH] [MLIR][OpenMP] Make omp.taskloop into a loop wrapper
This patch u
https://github.com/skatrak created
https://github.com/llvm/llvm-project/pull/87365
This patch updates the definition of `omp.simdloop` to enforce the restrictions
of a wrapper operation. It has been renamed to `omp.simd`, to better reflect
the naming used in the spec.
Some changes to Flang lo
https://github.com/skatrak updated
https://github.com/llvm/llvm-project/pull/87365
>From 3bcb4198c25d08ff7b4a220715fbe5e27e12414c Mon Sep 17 00:00:00 2001
From: Sergio Afonso
Date: Tue, 2 Apr 2024 17:20:37 +0100
Subject: [PATCH] [MLIR][Flang][OpenMP] Make omp.simdloop into a loop wrapper
This
https://github.com/skatrak edited
https://github.com/llvm/llvm-project/pull/87365
___
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/87365
___
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 ready_for_review
https://github.com/llvm/llvm-project/pull/87365
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
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://g
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 68514f2aed8d0144060008d01e6af2d9d3
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 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`.
Th
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
shared
@@ -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
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 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 = d
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
@@ -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 = r
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
@@ -916,49 +916,50 @@ static LogicalResult inlineReductionCleanup(
static LogicalResult
convertOmpWsloop(Operation &opInst, llvm::IRBuilderBase &builder,
LLVM::ModuleTranslation &moduleTranslation) {
- auto loop = cast(opInst);
- const bool isByRef = loop.get
@@ -1008,33 +1009,34 @@ convertOmpWsloop(Operation &opInst, llvm::IRBuilderBase
&builder,
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: call
@@ -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
__
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));
+ ASSERT_TRUE(isLe
@@ -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));
+ ASSERT_TRUE(isLe
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://lists.llvm.org/cgi-bin/mailman/lis
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
___
llvm-branch-
@@ -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 on
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 origina
@@ -990,6 +990,77 @@ static void printMapClause(OpAsmPrinter &p, Operation *op,
}
}
+static ParseResult parseMembersIndex(OpAsmParser &parser,
+ DenseIntElementsAttr &membersIdx) {
+ SmallVector values;
+ int64_t value;
+ int64_t shape[
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
https://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 s
@@ -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 origina
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
@@ -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:
Is there any reason for these functio
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 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
llvm-branch-commit
101 - 200 of 645 matches
Mail list logo