[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-06-25 Thread Jan Leyonberg via cfe-commits
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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-17 Thread Jan Leyonberg via cfe-commits
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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-13 Thread Jan Leyonberg via 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/4] [flang] Add -mlink-builtin-bitcode option to fc1 This patch

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Jan Leyonberg via 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/3] [flang] Add -mlink-builtin-bitcode option to fc1 This patch

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-12 Thread Jan Leyonberg via cfe-commits
@@ -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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -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_

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -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_

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via 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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
@@ -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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-10 Thread Jan Leyonberg via cfe-commits
@@ -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

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-07 Thread Jan Leyonberg via 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

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-24 Thread Jan Leyonberg via 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

[clang] [OpenMP] Remove complex reduction variable support (PR #82497)

2024-03-04 Thread Jan Leyonberg via cfe-commits
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

[llvm] [mlir] [clang] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-06 Thread Jan Leyonberg via cfe-commits
@@ -2042,35 +2057,1378 @@ OpenMPIRBuilder::createSection(const LocationDescription , /*IsCancellable*/ true); } -/// Create a function with a unique name and a "void (i8*, i8*)" signature in -/// the given module and return it. -Function

[llvm] [mlir] [clang] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-06 Thread Jan Leyonberg via cfe-commits
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

[llvm] [mlir] [clang] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-06 Thread Jan Leyonberg via cfe-commits
@@ -2042,35 +2057,1378 @@ OpenMPIRBuilder::createSection(const LocationDescription , /*IsCancellable*/ true); } -/// Create a function with a unique name and a "void (i8*, i8*)" signature in -/// the given module and return it. -Function

[clang] [mlir] [llvm] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-06 Thread Jan Leyonberg via cfe-commits
@@ -2719,10 +4051,24 @@ getKmpcForStaticLoopForType(Type *Ty, OpenMPIRBuilder *OMPBuilder, static void createTargetLoopWorkshareCall( OpenMPIRBuilder *OMPBuilder, WorksharingLoopType LoopType, BasicBlock *InsertBlock, Value *Ident, Value *LoopBodyArg, -Type

[llvm] [clang] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-06 Thread Jan Leyonberg via 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

[llvm] [clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-28 Thread Jan Leyonberg via 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

[clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Jan Leyonberg via cfe-commits
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

[clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Jan Leyonberg via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp , } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp , +

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Jan Leyonberg via cfe-commits
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