[flang] [clang] [flang][Driver] Support `-pthread` to the frontend. (PR #75739)

2023-12-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/75739 Adds `-pthread` option to flang. Since the GNU toolchain already adds the required linker flag, we only need to declare `FlangOption` as one of the supported options for `-pthread`. >From 2880ebc7f3eec9f0c03747c

[flang] [clang] [flang][Driver] Support `-pthread` to the frontend. (PR #75739)

2023-12-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/75739 >From 395b56fa481e0cd90adf98534f3b60a3cfc8f52b Mon Sep 17 00:00:00 2001 From: ergawy Date: Sun, 17 Dec 2023 06:29:49 -0600 Subject: [PATCH] [flang][Driver] Support `-pthread` to the frontend. Adds `-pthread` opti

[clang] [flang] [flang][Driver] Support `-pthread` to the frontend. (PR #75739)

2023-12-21 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > Hi @ergawy , thanks for this contribution! Could you add a test that would > demonstrate compilation failing without `-pthread`? Thanks for the suggestion. Actually I failed to do that 😆. After looking into it, seem that for the GNU toolchain, the `-pthread` flag would be redun

[flang] [clang] [flang][Driver] Support `-pthread` to the frontend. (PR #75739)

2023-12-22 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/75739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][Driver] Support `-pthread` to the frontend. (PR #75739)

2023-12-22 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Abandoning this PR since for the GNU toolchain there is no need to explicitly link with pthread to use the API. https://github.com/llvm/llvm-project/pull/75739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [flang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-09 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Thanks @tarunprabhu for opening this. I indeed closed my original PR but was about to reopen it after last week's discussion. At least for the GNU toolchain, it won't be easy to come up with a simple test that fails without `-pthread`. The reason is that the pthread API is actual

[clang] [flang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-10 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Sorry for the late reply. This slipped my mind. Added myself as a reviewer to not forget. > Could you take a look at #77135 and see whether `-gpulibc` could be helpful > for testing? I don't think this will help since that's a different library, right? For testing purposes, som

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy approved this pull request. https://github.com/llvm/llvm-project/pull/77360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 5dadb7acc6741f69c139855c7a7e1b9cc0c4290b Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-04 Thread Kareem Ergawy via cfe-commits
@@ -79,7 +79,14 @@ TYPE("c++-module-cpp-output",PP_CXXModule, INVALID, "iim",phases TYPE("ada", Ada, INVALID, nullptr, phases::Compile, phases::Backend, phases::Assemble, phases::Link) TYPE("assembler",PP_A

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-08 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 9e14adcabd84f1f746e60cb2cc4582f0c852a776 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-09-08 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-17 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > @ergawy Could you take a look at this, given that you did something similar > [even if it was much smaller] recently? Sorry, this totally slipped my mind. I will take a look today. https://github.com/llvm/llvm-project/pull/92430 ___ c

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/92430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-03 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/93920 >From 926cf8d19c625880c303aff0527e2e6e8a1629bd Mon Sep 17 00:00:00 2001 From: ergawy Date: Thu, 30 May 2024 23:16:39 -0500 Subject: [PATCH 1/3] [OpenMP][][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder`

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-03 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/93920 >From 926cf8d19c625880c303aff0527e2e6e8a1629bd Mon Sep 17 00:00:00 2001 From: ergawy Date: Thu, 30 May 2024 23:16:39 -0500 Subject: [PATCH 1/3] [OpenMP][][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder`

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/93920 >From 926cf8d19c625880c303aff0527e2e6e8a1629bd Mon Sep 17 00:00:00 2001 From: ergawy Date: Thu, 30 May 2024 23:16:39 -0500 Subject: [PATCH 1/3] [OpenMP][][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder`

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/93920 >From 926cf8d19c625880c303aff0527e2e6e8a1629bd Mon Sep 17 00:00:00 2001 From: ergawy Date: Thu, 30 May 2024 23:16:39 -0500 Subject: [PATCH 1/3] [OpenMP][][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder`

[clang] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)

2024-06-04 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/93920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy commented: Thanks @pranavb-ca! I did a first round and have a few comments. https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5229,13 +5362,288 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -1698,6 +1701,64 @@ void OpenMPIRBuilder::createTaskyield(const LocationDescription &Loc) { emitTaskyieldImpl(Loc); } +// Processes the dependencies in Dependencies and does the following +// - Allocates space on the stack of an array of DependInfo objects +// - Populate

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-05 Thread Kareem Ergawy via cfe-commits
@@ -5212,6 +5273,78 @@ static Function *createOutlinedFunction( return Func; } +// Create an entry point for a target task with the following. +// It'll have the following signature +// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task) +// This function is called

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-08-29 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-08-29 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 4ad28a2ab6566121994f14ea233f4fd27aca3285 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-08-29 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Thanks a lot for the reply and apologies for being late, it is my turn to be OoO :). Your reply definitely clarified a few things for me. I updated the PR title and added as a note as requested. Let me know if further details need to be added. https://github.com/llvm/llvm-proj

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-16 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/104664 This diff allows `.i` files emitted by flang-new to be treated as valid files in the pre-processing phase. This, in turn, allows flang-new to add pre-processing options (e.g. `-I`) when launching compilation job

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-16 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 1f504bf784ee3b19ed29d2db1ba4ba26ac7d7d66 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 8b911e77c30edb19cc5dbb95423de0290ddf2c6b Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 88baab5e4f1f37e7238d11aa416b3bc57cf961fe Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 5b76a29aca1e74b740cbb9b9297673fd532734b7 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 56b6eaf8d060f870f64e8d63771a2241cd534320 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-18 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Thanks for taking a look! 🙏 > Is there any reference that would document .i files? These are pre-processed Fortran source files. I do not know if these are standard or flang-new specific tbh. However, I updated the PR title and description with more info about these files and wh

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-21 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > Please bear with me, it's been a while since I've touched this and also, I am > afk 😅 No worries. I am new to this part of the code and might be misinterpreting things myself. > IIRC, the generated temp files (e.g. *.i) are used for the subsequent > compilation phases. So, af

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-21 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 205ed1497a145664471055b24ea0391f93b30711 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-26 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Ping! @banach-space did you manage to take another look? Please let me know if you disagree with my reply above or have further comments. 🙏 https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-26 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 714a4308272134fc83f1640f9303fc535a42cfd3 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Looks like this broke some buildbots. Looking into the reported failures ... 👀 https://github.com/llvm/llvm-project/pull/113305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/113305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/113305 >From 83088c0b47f7582729f11f996d850e5757fcb872 Mon Sep 17 00:00:00 2001 From: ergawy Date: Tue, 22 Oct 2024 02:02:58 -0500 Subject: [PATCH] [flang][OpenMP] Support `target enter|update|exit .. nowait` Extends `n

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/113305 >From 70a0c97fa86445d1f888cf3645c0b59df9e4a9d7 Mon Sep 17 00:00:00 2001 From: ergawy Date: Tue, 22 Oct 2024 02:02:58 -0500 Subject: [PATCH] [flang][OpenMP] Support `target enter|update|exit .. nowait` Extends `n

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
@@ -6403,16 +6401,45 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData( SrcLocInfo = getOrCreateIdent(SrcLocStr, SrcLocStrSize); } -Value *OffloadingArgs[] = {SrcLocInfo, DeviceID, - PointerNum,

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/113305 >From 52b59662de0693d3c9acb4e52d87e748cb9153cf Mon Sep 17 00:00:00 2001 From: ergawy Date: Tue, 22 Oct 2024 02:02:58 -0500 Subject: [PATCH] [flang][OpenMP] Support `target enter|update|exit .. nowait` Extends `n

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-23 Thread Kareem Ergawy via cfe-commits
@@ -6403,16 +6401,45 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData( SrcLocInfo = getOrCreateIdent(SrcLocStr, SrcLocStrSize); } -Value *OffloadingArgs[] = {SrcLocInfo, DeviceID, - PointerNum,

[clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)

2024-10-22 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/113305 >From fddc36ea4086aaaf415f9c5b1f0150969eeacc6e Mon Sep 17 00:00:00 2001 From: ergawy Date: Tue, 22 Oct 2024 02:02:58 -0500 Subject: [PATCH] [flang][OpenMP] Support `target enter|update|exit .. nowait` Extends `n

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-06 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From f938ba2240e03756ac7597eedd0b5ac3ad1ece3e Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-06 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 03d500e28d76ab356537f771dd75ecce4010bd48 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-06 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/126026 This PR starts the effort to upstream AMD's internal implementation of `do concurrent` to OpenMP mapping. This replaces #77285 since we extended this WIP quite a bit on our fork over the past year. An important

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-06 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-06 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 04b5656b48bedf1250280c4145ee1c9b2a3f7cdf Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-10 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 4ea51578a841ae29e17a366d96a7c0f626806623 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-10 Thread Kareem Ergawy via cfe-commits
@@ -6910,6 +6910,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_paral

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-10 Thread Kareem Ergawy via cfe-commits
@@ -142,6 +142,12 @@ static llvm::cl::opt llvm::cl::desc("enable openmp device compilation"), llvm::cl::init(false)); +static llvm::cl::opt enableDoConcurrentToOpenMPConversion( +"fdo-concurrent-parallel", erga

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-10 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Ping! Please take a look when you have time. And let me know if you disagree with any decisions taken in the current approach or need any clarification/expansion in the next steps section of the status tracking document. https://github.com/llvm/llvm-project/pull/126026 _

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @skatrak @kiranchandramohan I removed the "current status" part of the document. Left the other sections since they are not related to upcoming upstreaming PRs. https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing li

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/7] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/6] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/8] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,53 @@ +! Mark as xfail for now until we upstream the relevant part. This is just for +! demo purposes at this point. Upstreaming this is the next step. +! XFAIL: * + +! Tests mapping of a basic `do concurrent` loop to `!$omp parallel do`. + +! RUN: %flang_fc1 -emit-hlfi

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -292,7 +298,19 @@ createTargetMachine(llvm::StringRef targetTriple, std::string &error) { static llvm::LogicalResult runOpenMPPasses(mlir::ModuleOp mlirModule) { mlir::PassManager pm(mlirModule->getName(), mlir::OpPassManager::Nesting::Implicit); -

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/3] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,104 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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: Ap

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/4] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -352,16 +352,37 @@ bool CodeGenAction::beginSourceFileAction() { // Add OpenMP-related passes // WARNING: These passes must be run immediately after the lowering to ensure // that the FIR is correct with respect to OpenMP operations/attributes. - if (ci.getInvocation(

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-17 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Ping! Any objections to merging this PR? cc @skatrak @clementval @tarunprabhu (and other reviewers). https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-16 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 2a54270a2ad7f42ddf6787afd81a8b98641f8082 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 01/10] [flang][OpenMP] Upstream first part of `do concurrent` mapping Th

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From f946ee6c8c34819d36818dbc3a5430c8b9e8a059 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 477b5b8d22ddd7b0a873519c8cc16b0e4a3c81ca Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127478)

2025-02-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/127478 Upstreams the next part of `do concurrent` to OpenMP mapping pass (from AMD's ROCm implementation). See https://github.com/llvm/llvm-project/pull/126026 for more context. This PR add loop nest detection logic. T

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-17 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,104 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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: Ap

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-21 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Thanks @skatrak and @bhandarkar-pranav for the approval. @kiranchandramohan @clementval I think there is a pretty simple solution that enables us to mark multi-range loop nests. I think we can add an optional attribute to the `fir::DoLoopOp` to store the loop nest depth: `nest_de

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @clementval @jeanPerier can you please take a look at the PR and @kiranchandramohan's comment above? 🙏 https://github.com/llvm/llvm-project/pull/127595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-24 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @kiranchandramohan @clementval thanks for your comments (and sorry for the late response, I was off yesterday). Sure, we can works on a multi-range loop op in FIR, our team did not write the current loop op definition so I was working with what I have. Just to be on the same pag

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-20 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/127595 >From 2e89efa197e7a5d3c27e33795781b1c25a123a8c Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-25 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > Extending the current fir.do_loop operation to model multi-block loop bodies > is not recommended, I think. It is there to model structured fortran loops. > If you want to handle multi-block loop bodies you will need a new operation. If it is ok, let's postpone this issue until

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-18 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @mjklemm suggested to add a warning that the pass is still experimental, which I think is a good idea. However, I am wondering what the best place for that warning would be? I prefer not to do that in `CodeGenAction::beginSourceFileAction()` (where we inspect the flag and actual

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-18 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > It is slightly unfortunate to rediscover the loops so early in the flow when > we had it in source. Totally agree, it should be more trivial than this. And it actually was slight worse, see: https://github.com/llvm/llvm-project/pull/114020. > Have you considered changing the r

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/127595 Upstreams the next part of do concurrent to OpenMP mapping pass (from AMD's ROCm implementation). See https://github.com/llvm/llvm-project/pull/126026 for more context. This PR add loop nest detection logic. Thi

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127478)

2025-02-18 Thread Kareem Ergawy via cfe-commits
ergawy wrote: Abandoned in favor of https://github.com/llvm/llvm-project/pull/127595. https://github.com/llvm/llvm-project/pull/127478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127478)

2025-02-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy closed https://github.com/llvm/llvm-project/pull/127478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/127595 >From 0b8b320c30d53eedbe057a8ad10b74e09b2e15f9 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-18 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 0b8b320c30d53eedbe057a8ad10b74e09b2e15f9 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH] [flang][OpenMP] Upstream first part of `do concurrent` mapping This PR

  1   2   >