https://github.com/jsjodin edited
https://github.com/llvm/llvm-project/pull/72638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule,
}
}
+// Add to MLIR code target specific items which are dependent on target
+// configuration specified by the user
+static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule,
+
https://github.com/jsjodin requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/72638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jsjodin approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/72638
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jsjodin wrote:
I think the patch should be split up into at least 2 pieces. First would be the
migration work and changes to Clang, the second would be working on adding
reduction support for flang.
https://github.com/llvm/llvm-project/pull/80343
__
@@ -2719,10 +4051,24 @@ getKmpcForStaticLoopForType(Type *Ty, OpenMPIRBuilder
*OMPBuilder,
static void createTargetLoopWorkshareCall(
OpenMPIRBuilder *OMPBuilder, WorksharingLoopType LoopType,
BasicBlock *InsertBlock, Value *Ident, Value *LoopBodyArg,
-Type *Parall
@@ -2042,35 +2057,1378 @@ OpenMPIRBuilder::createSection(const
LocationDescription &Loc,
/*IsCancellable*/ true);
}
-/// Create a function with a unique name and a "void (i8*, i8*)" signature in
-/// the given module and return it.
-Function *get
jsjodin wrote:
> @jsjodin This PR only has the migration work. Flang/MLIR is left unchanged
> other than the few necessary changes.
>
> Once this patch is merged, I'll put up a PR for having MLIR use these
> additions.
There is some code that is related to Flang/MLIR that shouldn't be in the
@@ -2042,35 +2057,1378 @@ OpenMPIRBuilder::createSection(const
LocationDescription &Loc,
/*IsCancellable*/ true);
}
-/// Create a function with a unique name and a "void (i8*, i8*)" signature in
-/// the given module and return it.
-Function *get
jsjodin wrote:
@alexey-bataev do you have any concerns about removing this case?
https://github.com/llvm/llvm-project/pull/82497
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jsjodin created
https://github.com/llvm/llvm-project/pull/94763
This patch enables the -mlink-builtin-bitcode flag in fc1 so that bitcode
libraries can be linked in. This is needed for OpenMP offloading libraries.
>From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:
@@ -0,0 +1,18 @@
+
+!--
+! RUN lines
+!--
+! Embed something that can be easily checked
+! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o -
-mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s
jsjodin wrote:
The triple
@@ -1146,6 +1150,54 @@ void CodeGenAction::embedOffloadObjects() {
}
}
+void CodeGenAction::linkBuiltinBCLibs() {
jsjodin wrote:
It does come from clang but it is distributed across a few classes with a lot
more options, so there was not simple way to simp
jsjodin wrote:
Yes, it should be possible to add a command to generate the .bc file, that is
probably a better option anyway since we would avoid specifying the triple.
https://github.com/llvm/llvm-project/pull/94763
___
https://github.com/jsjodin edited
https://github.com/llvm/llvm-project/pull/94763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/94763
>From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Wed, 5 Jun 2024 10:56:41 -0400
Subject: [PATCH 1/2] [flang] Add -mlink-builtin-bitcode option to fc1
This patch e
@@ -0,0 +1,18 @@
+
+!--
+! RUN lines
+!--
+! Embed something that can be easily checked
+! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o -
-mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s
+
+! CHECK: define internal void @libfun_
+
@@ -0,0 +1,18 @@
+
+!--
+! RUN lines
+!--
+! Embed something that can be easily checked
+! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o -
-mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s
+
+! CHECK: define internal void @libfun_
+
@@ -0,0 +1,15 @@
+! Test -mlink-builtin-bitcode flag
+! RUN: %flang -emit-llvm -c -o %t.bc %S/Inputs/libfun.f90
+! RUN: %flang_fc1 -emit-llvm -o - -mlink-builtin-bitcode %t.bc %s 2>&1 |
FileCheck %s
+
+! CHECK: define internal void @libfun_
+
+! RUN: not %flang_fc1 -emit-llvm -tr
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/94763
>From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Wed, 5 Jun 2024 10:56:41 -0400
Subject: [PATCH 1/3] [flang] Add -mlink-builtin-bitcode option to fc1
This patch e
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/94763
>From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Wed, 5 Jun 2024 10:56:41 -0400
Subject: [PATCH 1/4] [flang] Add -mlink-builtin-bitcode option to fc1
This patch e
https://github.com/jsjodin closed
https://github.com/llvm/llvm-project/pull/94763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jsjodin edited
https://github.com/llvm/llvm-project/pull/100358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -607,15 +621,17 @@ class OpenMPIRBuilder {
/// Generator for '#omp barrier'
///
/// \param Loc The location where the barrier directive was encountered.
- /// \param DK The kind of directive that caused the barrier.
+ /// \param Kind The kind of directive that caused
https://github.com/jsjodin edited
https://github.com/llvm/llvm-project/pull/97088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jsjodin approved this pull request.
One nit, otherwise LGTM.
https://github.com/llvm/llvm-project/pull/97088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9536,18 +9506,65 @@ static void emitTargetCallKernelLaunch(
MEHandler.adjustMemberOfForLambdaCaptures(
OMPBuilder, LambdaPointers, CombinedInfo.BasePointers,
CombinedInfo.Pointers, CombinedInfo.Types);
+}
+static void
+genMapInfo(MappableExprsHandler &MEHandle
https://github.com/jsjodin approved this pull request.
This looks good to me now. You can wait a few days before merging to let
@jdoerfert look it over again.
https://github.com/llvm/llvm-project/pull/80343
___
cfe-commits mailing list
cfe-commits@li
@@ -9041,257 +9041,65 @@ void CGOpenMPRuntime::emitUserDefinedMapper(const
OMPDeclareMapperDecl *D,
return;
ASTContext &C = CGM.getContext();
QualType Ty = D->getType();
- QualType PtrTy = C.getPointerType(Ty).withRestrict();
- QualType Int64Ty = C.getIntTypeForBitwi
https://github.com/jsjodin approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/110001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4645,12 +4789,23 @@ initTargetDefaultAttrs(omp::TargetOp targetOp,
Operation *capturedOp,
(maxThreadsVal >= 0 && maxThreadsVal < combinedMaxThreadsVal))
combinedMaxThreadsVal = maxThreadsVal;
+ // Calculate reduction data size, limited to single reduction varia
@@ -3688,27 +3708,95 @@ static Function *getFreshReductionFunc(Module &M) {
".omp.reduction.func", &M);
}
-OpenMPIRBuilder::InsertPointOrErrorTy
-OpenMPIRBuilder::createReductions(const LocationDescription &Loc,
- Inse
https://github.com/jsjodin created
https://github.com/llvm/llvm-project/pull/133310
This patch adds the lowering of teams reductions from the omp dialect to
LLVM-IR. Some minor cleanup was done in clang to remove an unused parameter.
>From 50fefbb31f4de7352c241c48fe5382785daaef21 Mon Sep 17 0
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/133310
>From 50fefbb31f4de7352c241c48fe5382785daaef21 Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Sun, 23 Mar 2025 09:56:51 -0400
Subject: [PATCH 1/9] Initial modifications to support reductions in flang.
---
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/133310
>From 50fefbb31f4de7352c241c48fe5382785daaef21 Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Sun, 23 Mar 2025 09:56:51 -0400
Subject: [PATCH 01/10] Initial modifications to support reductions in flang.
---
@@ -4161,6 +4247,37 @@ convertOmpDistribute(Operation &opInst,
llvm::IRBuilderBase &builder,
if (failed(checkImplementationStatus(opInst)))
return failure();
+ /// Process teams op reduction in distribute if the reduction is contained in
+ /// the distribute op.
+ om
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/133310
>From 8193adb194d456c8d8f719869d920b6214f0505e Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Sun, 23 Mar 2025 09:56:51 -0400
Subject: [PATCH 1/9] Initial modifications to support reductions in flang.
---
https://github.com/jsjodin updated
https://github.com/llvm/llvm-project/pull/133310
>From 78f53d76e6b5fd778cd2ec4fc1aa80b0c42ce582 Mon Sep 17 00:00:00 2001
From: Jan Leyonberg
Date: Sun, 23 Mar 2025 09:56:51 -0400
Subject: [PATCH 1/9] Initial modifications to support reductions in flang.
---
38 matches
Mail list logo