@@ -2612,7 +2612,54 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
TIFitis wrote:
Polite request for review 🙂
https://github.com/llvm/llvm-project/pull/117046
___
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
@@ -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/TIFitis updated
https://github.com/llvm/llvm-project/pull/124746
>From a8671fc83f026a692802d4eee25c91657228928b Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Tue, 28 Jan 2025 13:38:13 +
Subject: [PATCH 1/3] [MLIR][OpenMP] Add LLVM translation support for OpenMP
Use
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/121005
>From 5fe7a97dd2f1844ad4d538c0ee5bf47f44aefa95 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 21:50:03 +
Subject: [PATCH] Add OpenMP to LLVM dialect conversion support for
DeclareMappe
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/121001
>From 44eafafd74ecbce7ed7c4a408fff6c82b4cc07e1 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 21:13:42 +
Subject: [PATCH 1/2] Add flang lowering changes for mapper field in map
clause.
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/124746
>From 431c404dc125aa6b27f32b6019baebf603111f51 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Tue, 28 Jan 2025 15:45:55 +
Subject: [PATCH 1/5] Add description for mapper_id. Add verifier check for
vali
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/124746
>From 5ca5a1f7c1e33949f8e0d32a4c94645842432559 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Tue, 28 Jan 2025 15:45:55 +
Subject: [PATCH 1/8] Add description for mapper_id. Add verifier check for
vali
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/124746
>From 5ca5a1f7c1e33949f8e0d32a4c94645842432559 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Tue, 28 Jan 2025 15:45:55 +
Subject: [PATCH 1/8] Add description for mapper_id. Add verifier check for
vali
@@ -2709,13 +2709,23 @@ getRefPtrIfDeclareTarget(mlir::Value value,
}
namespace {
+// Append customMappers information to existing MapInfosTy
+struct MapInfosTy : llvm::OpenMPIRBuilder::MapInfosTy {
+ SmallVector Mappers;
TIFitis wrote:
Yes, we can do that,
@@ -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
@@ -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
@@ -2709,13 +2709,23 @@ getRefPtrIfDeclareTarget(mlir::Value value,
}
namespace {
+// Append customMappers information to existing MapInfosTy
+struct MapInfosTy : llvm::OpenMPIRBuilder::MapInfosTy {
+ SmallVector Mappers;
TIFitis wrote:
Technically it might
@@ -186,6 +186,32 @@ struct MapInfoOpConversion : public
ConvertOpToLLVMPattern {
}
};
+struct DeclMapperOpConversion
TIFitis wrote:
I tried to use the `MultiRegionOpConversion` but it doesn't support Ops with a
single region, and `RegionOpConversion` doe
TIFitis wrote:
@kiranchandramohan @skatrak @agozillon Hi everyone! I was on vacation these
last couple of weeks, apologies for the delay.
I have added PR #124746 with which we have all the implementation in place for
declare mappers.
It would be great to resume the review process for this PR
https://github.com/TIFitis 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
@@ -1000,6 +1000,7 @@ def MapInfoOp : OpenMP_Op<"map.info",
[AttrSizedOperandSegments]> {
OptionalAttr:$members_index,
Variadic:$bounds, /* rank-0 to
rank-{n-1} */
OptionalAttr:$map_type,
+
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/120994
>From 002d7153f4029c02722b6a4f45bbde8fad83ba95 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 20:53:47 +
Subject: [PATCH 1/2] Add mapper field to mapInfoOp.
---
flang/lib/Lower/OpenMP
@@ -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
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/121001
>From 30611f81421028ccc8fceed006e06f8afc6848b9 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 19:05:30 +
Subject: [PATCH 1/3] Add mapper field to mapInfoOp.
---
flang/test/Lower/OpenM
@@ -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()
@@ -970,6 +972,20 @@ void ClauseProcessor::processMapObjects(
}
}
+if (!mapperIdName.empty()) {
+ if (mapperIdName == "default") {
+auto &typeSpec = object.sym()->owner().IsDerivedType()
+ ? *object.sym()->owner().derivedT
https://github.com/TIFitis edited
https://github.com/llvm/llvm-project/pull/121001
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -186,6 +186,32 @@ struct MapInfoOpConversion : public
ConvertOpToLLVMPattern {
}
};
+struct DeclMapperOpConversion
TIFitis wrote:
Hi, sorry for the late reply, I've just returned from my vacation.
Can we use a specialised `forwardOpAttrs` to convert th
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/124746
>From 6bba19e7df6da05f77e5e1ac5fb06c4fb2a1bda0 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Tue, 28 Jan 2025 13:38:13 +
Subject: [PATCH 1/2] [MLIR][OpenMP] Add LLVM translation support for OpenMP
Use
https://github.com/TIFitis 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/TIFitis edited
https://github.com/llvm/llvm-project/pull/121001
___
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/TIFitis created
https://github.com/llvm/llvm-project/pull/121005
Add conversion support from FIR to LLVM Dialect for OMP DeclareMapper.
>From 8a90d208ace9b8fe34f427f6268968e8b4b08976 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 21:50:03 +
Subject:
https://github.com/TIFitis edited
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/TIFitis created
https://github.com/llvm/llvm-project/pull/121001
Add Lowering support for OpenMP mapper field in mapInfoOp.
Depends on #120994.
>From 30611f81421028ccc8fceed006e06f8afc6848b9 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 19:05:30 +
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/120994
>From 002d7153f4029c02722b6a4f45bbde8fad83ba95 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 20:53:47 +
Subject: [PATCH] Add mapper field to mapInfoOp.
---
flang/lib/Lower/OpenMP/Uti
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/120994
>From 0b54cafc829119b931d04d1d9ec3e790e50f7b08 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 19:05:30 +
Subject: [PATCH] Add mapper field to mapInfoOp.
---
flang/lib/Lower/OpenMP/Uti
https://github.com/TIFitis created
https://github.com/llvm/llvm-project/pull/120994
This patch adds the mapper field to the omp.map.info op.
>From 21178b07176869e000f7e027bc5c9593b715b5ad Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Mon, 23 Dec 2024 19:05:30 +
Subject: [PATCH] Add m
TIFitis wrote:
@kiranchandramohan @kparzysz I guess I must be using the name mangler in an
incorrect way then. I've added the code snippets I am using when lowering and
later performing a lookup. Please let me know what would be the correct way of
doing this.
When lowering DeclMapperOp:
```
s
TIFitis wrote:
@kiranchandramohan I discussed the current approach with @skatrak today. When
trying to implement the mapper lowering for the map clause, it became apparent
that we need to add the `declMapperOp` name to the `SymbolTable`. As such, we
would also need to hoist the `declareMapperO
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
TIFitis wrote:
As @agozillon requested, here's a sample of how Clang lowers declare mapper.
**C Code:**
```
typedef struct {
int *ptr;
int buf_size;
} T;
#pragma omp declare mapper(deep_copy : T abc) map(abc, abc.ptr[ : abc.buf_size])
int main() {
T xyz;
#pragma omp target data map(mapper(
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -2701,7 +2701,42 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
https://github.com/TIFitis edited
https://github.com/llvm/llvm-project/pull/117046
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2701,7 +2702,39 @@ static void
genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
const parser::OpenMPDeclareMapperConstruct &declareMapperConstruct) {
- TODO(converter.getC
@@ -21,7 +21,7 @@ subroutine declare_mapper_1
type (my_type2):: t
real :: x, y(nvals)
!$omp declare mapper (my_type :: var) map (var, var%values (1:var%num_vals))
-!CHECK: not yet implemented: OpenMPDeclareMapperConstruct
+!CHECK: not yet impleme
https://github.com/TIFitis approved this pull request.
LGTM :)
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
@@ -13,19 +13,22 @@
#include "Utils.h"
#include "Clauses.h"
+#include
+
+#include
#include
+#include
TIFitis wrote:
Are all of the header file changes necessary? Just making sure we only have the
minimal set here.
https://github.com/llvm/llvm-project/p
@@ -2663,6 +2657,8 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
auto mapOp = dyn_cast(mapData.MapClause[mapDataIndex]);
int firstMemberIdx = getMapDataMemberIdx(
mapData, getFirstOrLastMappedMemberPtr(mapOp, true));
+// NOTE/TODO: Sh
https://github.com/TIFitis approved this pull request.
Added couple of nit comments. Otherwise happy with the patch. Thank you for the
amazing work :)
https://github.com/llvm/llvm-project/pull/91
___
llvm-branch-commits mailing list
llvm-branch-co
https://github.com/TIFitis edited
https://github.com/llvm/llvm-project/pull/91
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2468,51 +2468,45 @@ static int getMapDataMemberIdx(MapInfoData &mapData,
omp::MapInfoOp memberOp) {
return std::distance(mapData.MapClause.begin(), res);
}
-static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo,
-
https://github.com/TIFitis approved this pull request.
Im happy with the changes. Thanks :)
https://github.com/llvm/llvm-project/pull/109810
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/101707
>From 10f575c3457719e2b21f9633c890c34ae671548e Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Fri, 2 Aug 2024 17:11:21 +0100
Subject: [PATCH] [OpenMP]Update use_device_clause lowering
This patch updates th
@@ -2193,80 +2197,137 @@ llvm::Value *getSizeInBytes(DataLayout &dl, const
mlir::Type &type,
return builder.getInt64(dl.getTypeSizeInBits(type) / 8);
}
-void collectMapDataFromMapVars(MapInfoData &mapData,
- llvm::SmallVectorImpl &mapVars,
-
TIFitis wrote:
Ping for review.
https://github.com/llvm/llvm-project/pull/101707
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2439,7 +2504,7 @@ static llvm::omp::OpenMPOffloadMappingFlags
mapParentWithMembers(
// data by the descriptor (which itself, is a structure containing
// runtime information on the dynamically allocated data).
auto parentClause =
- llvm::cast(mapData.MapClause[m
TIFitis wrote:
@skatrak Thanks for the review, I've addressed the comments in the latest
revision.
https://github.com/llvm/llvm-project/pull/101707
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/101707
>From 547b339b175fa996eef8d45c5df8a73967ee94c2 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Fri, 2 Aug 2024 17:11:21 +0100
Subject: [PATCH 1/3] [OpenMP]Update use_device_clause lowering
This patch update
@@ -6357,7 +6357,7 @@ OpenMPIRBuilder::InsertPointTy
OpenMPIRBuilder::createTargetData(
// Disable TargetData CodeGen on Device pass.
if (Config.IsTargetDevice.value_or(false)) {
if (BodyGenCB)
- Builder.restoreIP(BodyGenCB(Builder.saveIP(), BodyGenTy::NoPriv));
+
@@ -2193,80 +2197,141 @@ llvm::Value *getSizeInBytes(DataLayout &dl, const
mlir::Type &type,
return builder.getInt64(dl.getTypeSizeInBits(type) / 8);
}
-void collectMapDataFromMapVars(MapInfoData &mapData,
- llvm::SmallVectorImpl &mapVars,
-
@@ -2193,80 +2197,141 @@ llvm::Value *getSizeInBytes(DataLayout &dl, const
mlir::Type &type,
return builder.getInt64(dl.getTypeSizeInBits(type) / 8);
}
-void collectMapDataFromMapVars(MapInfoData &mapData,
- llvm::SmallVectorImpl &mapVars,
-
TIFitis wrote:
Thanks @Dinistro for the comments, I've addressed them in the latest revision.
https://github.com/llvm/llvm-project/pull/101707
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/101707
>From 3a2afe783bfd65c981424fb14d2b0f42ea0b6618 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Fri, 2 Aug 2024 17:11:21 +0100
Subject: [PATCH 1/2] [OpenMP]Update use_device_clause lowering
This patch update
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/101707
>From 3a2afe783bfd65c981424fb14d2b0f42ea0b6618 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Fri, 2 Aug 2024 17:11:21 +0100
Subject: [PATCH] [OpenMP]Update use_device_clause lowering
This patch updates th
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/102341
>From ba8cf358a98cfcce6b1239ac88391bc25bcc7197 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Wed, 7 Aug 2024 18:31:08 +0100
Subject: [PATCH 1/3] [OpenMP][MLIR] Set omp.composite attr for composite loop
wr
TIFitis wrote:
Thanks @skatrak for the review, I've updated the PR to address the comments.
https://github.com/llvm/llvm-project/pull/102341
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/102341
>From ba8cf358a98cfcce6b1239ac88391bc25bcc7197 Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Wed, 7 Aug 2024 18:31:08 +0100
Subject: [PATCH 1/2] [OpenMP][MLIR] Set omp.composite attr for composite loop
wr
https://github.com/TIFitis created
https://github.com/llvm/llvm-project/pull/102341
This patch sets the omp.composite unit attr for composite wrapper ops and also
add appropriate checks to the verifiers of supported ops for the
presence/absence of the attribute.
This is patch 2/2 in a series
https://github.com/TIFitis updated
https://github.com/llvm/llvm-project/pull/101707
>From 9db19516d50cd4f6a597fbd811419af98859315a Mon Sep 17 00:00:00 2001
From: Akash Banerjee
Date: Fri, 2 Aug 2024 17:11:21 +0100
Subject: [PATCH] [OpenMP]Update use_device_clause lowering
This patch updates th
https://github.com/TIFitis created
https://github.com/llvm/llvm-project/pull/101707
This patch updates the use_device_ptr and use_device_addr clauses to use the
mapInfoOps for lowering. This allows all the types that are handle by the map
clauses such as derived types to also be supported by t
https://github.com/TIFitis approved this pull request.
https://github.com/llvm/llvm-project/pull/100381
___
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/TIFitis approved this pull request.
I'm happy with the patch. Thanks for the good work :)
https://github.com/llvm/llvm-project/pull/92523
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/
75 matches
Mail list logo