[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -3197,37 +3303,77 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers( // what we support as expected. llvm::omp::OpenMPOffloadMappingFlags mapFlag = mapData.Types[mapDataIndex]; ompBuilder.setCorrectMemberOfFlag(mapFlag, memberOfFlag); -comb

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/119588 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -2979,39 +2979,61 @@ static int getMapDataMemberIdx(MapInfoData &mapData, omp::MapInfoOp memberOp) { return std::distance(mapData.MapClause.begin(), res); } -static omp::MapInfoOp getFirstOrLastMappedMemberPtr(omp::MapInfoOp mapInfo, -

[llvm-branch-commits] [flang] [llvm] [mlir] [MLIR][OpenMP] Introduce overlapped record type map support (PR #119588)

2025-01-24 Thread Sergio Afonso via llvm-branch-commits
@@ -3197,37 +3303,77 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers( // what we support as expected. llvm::omp::OpenMPOffloadMappingFlags mapFlag = mapData.Types[mapDataIndex]; ompBuilder.setCorrectMemberOfFlag(mapFlag, memberOfFlag); -comb

[llvm-branch-commits] [llvm] [mlir] [OMPIRBuilder][MLIR] Add support for target 'if' clause (PR #122478)

2025-01-14 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/122478 >From 8c348ba2796e08d45fe167d52db0fe047eaafa8a Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Fri, 10 Jan 2025 15:40:05 + Subject: [PATCH] [OMPIRBuilder][MLIR] Add support for target 'if' clause This pa

[llvm-branch-commits] [llvm] [mlir] [OMPIRBuilder][MLIR] Add support for target 'if' clause (PR #122478)

2025-01-14 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/122478 >From 8c348ba2796e08d45fe167d52db0fe047eaafa8a Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Fri, 10 Jan 2025 15:40:05 + Subject: [PATCH 1/2] [OMPIRBuilder][MLIR] Add support for target 'if' clause Thi

[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Support runtime number of teams and threads, and SPMD mode (PR #116051)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: The PR stack should be almost ready to be merged in the next few days (buildbot failures are unrelated). If there are any remaining blockers from your side, let me know @jdoerfert. https://github.com/llvm/llvm-project/pull/116051 ___ l

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -3889,6 +3889,215 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg, return builder.saveIP(); } +/// Follow uses of `host_eval`-defined block arguments of the given `omp.target` +/// operation and populate output variables with their correspondin

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -3889,6 +3889,215 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg, return builder.saveIP(); } +/// Follow uses of `host_eval`-defined block arguments of the given `omp.target` +/// operation and populate output variables with their correspondin

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -3889,6 +3889,215 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg, return builder.saveIP(); } +/// Follow uses of `host_eval`-defined block arguments of the given `omp.target` +/// operation and populate output variables with their correspondin

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -3889,6 +3889,215 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg, return builder.saveIP(); } +/// Follow uses of `host_eval`-defined block arguments of the given `omp.target` +/// operation and populate output variables with their correspondin

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -289,7 +281,16 @@ static LogicalResult checkImplementationStatus(Operation &op) { checkBare(op, result); checkDevice(op, result); checkHasDeviceAddr(op, result); -checkHostEval(op, result); + +// Host evaluated clauses are supported,

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116052 >From 9cf700147b302de9bb9fc5ec1453aa660ecb8411 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 12 Nov 2024 10:49:28 + Subject: [PATCH 1/2] [MLIR][OpenMP] LLVM IR translation of host_eval This patch

[llvm-branch-commits] [flang] [mlir] [Flang][OpenMP] Lowering of host-evaluated clauses (PR #116219)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -55,6 +55,149 @@ static void genOMPDispatch(lower::AbstractConverter &converter, const ConstructQueue &queue, ConstructQueue::const_iterator item); +static void processHostEvalClauses(lower::AbstractConverter &converter

[llvm-branch-commits] [flang] [mlir] [Flang][OpenMP] Lowering of host-evaluated clauses (PR #116219)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116219 >From 3490effe3ecabfa805c3cd9d9c02b644e35ce3f0 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Thu, 14 Nov 2024 12:24:15 + Subject: [PATCH] [Flang][OpenMP] Lowering of host-evaluated clauses This patch a

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
@@ -3889,6 +3889,215 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg, return builder.saveIP(); } +/// Follow uses of `host_eval`-defined block arguments of the given `omp.target` +/// operation and populate output variables with their correspondin

[llvm-branch-commits] [flang] [mlir] [Flang][OpenMP] Lowering of host-evaluated clauses (PR #116219)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116219 >From d2b7ffef6e2a1cce81f47e7d1886551aef677ed8 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Thu, 14 Nov 2024 12:24:15 + Subject: [PATCH] [Flang][OpenMP] Lowering of host-evaluated clauses This patch a

[llvm-branch-commits] [llvm] [mlir] [OMPIRBuilder][MLIR] Add support for target 'if' clause (PR #122478)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/122478 This patch implements support for handling the 'if' clause of OpenMP 'target' constructs in the OMPIRBuilder and updates MLIR to LLVM IR translation of the `omp.target` MLIR operation to make use of this new fe

[llvm-branch-commits] [llvm] [mlir] [OMPIRBuilder][MLIR] Add support for target 'if' clause (PR #122478)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #122477 - #122478 https://github.com/llvm/llvm-project/pull/122478 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116052 >From 9cf700147b302de9bb9fc5ec1453aa660ecb8411 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 12 Nov 2024 10:49:28 + Subject: [PATCH] [MLIR][OpenMP] LLVM IR translation of host_eval This patch adds

[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Support runtime number of teams and threads, and SPMD mode (PR #116051)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/116051 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [mlir] [OMPIRBuilder][MLIR] Add support for target 'if' clause (PR #122478)

2025-01-10 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/122478 >From 83c1d7917c863026b30310ea7a1a42ea9467fd55 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Fri, 10 Jan 2025 15:40:05 + Subject: [PATCH] [OMPIRBuilder][MLIR] Add support for target 'if' clause This pa

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] LLVM IR translation of host_eval (PR #116052)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116052 >From 9035b53e097a46642c7d10df543d93c5a818dead Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 12 Nov 2024 10:49:28 + Subject: [PATCH] [MLIR][OpenMP] LLVM IR translation of host_eval This patch adds

[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Support runtime number of teams and threads, and SPMD mode (PR #116051)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116051 >From 47a64959c79fbdec4e6108ddad8f2b2317ce0b76 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Wed, 27 Nov 2024 11:33:01 + Subject: [PATCH] [OMPIRBuilder] Support runtime number of teams and threads, and

[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Support runtime number of teams and threads, and SPMD mode (PR #116051)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116051 >From 76b2b9f55e73a533e2a6aa0c98ebb1509e2d7dbd Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Wed, 27 Nov 2024 11:33:01 + Subject: [PATCH] [OMPIRBuilder] Support runtime number of teams and threads, and

[llvm-branch-commits] [flang] [mlir] [Flang][OpenMP] Lowering of host-evaluated clauses (PR #116219)

2025-01-09 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/116219 >From 65d6b2f57327adbc0ecd5600f633f557bcce313d Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Thu, 14 Nov 2024 12:24:15 + Subject: [PATCH] [Flang][OpenMP] Lowering of host-evaluated clauses This patch a

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-03-18 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/127634 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-03-18 Thread Sergio Afonso via llvm-branch-commits
@@ -28,64 +28,80 @@ namespace looputils { /// Stores info needed about the induction/iteration variable for each `do /// concurrent` in a loop nest. struct InductionVariableInfo { + InductionVariableInfo(fir::DoLoopOp doLoop) { populateInfo(doLoop); } + /// The operation al

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-04-05 Thread Sergio Afonso via llvm-branch-commits
@@ -210,6 +223,96 @@ mlir::LogicalResult collectLoopNest(fir::DoLoopOp currentLoop, return mlir::success(); } + +/// Prepares the `fir.do_loop` nest to be easily mapped to OpenMP. In +/// particular, this function would take this input IR: +/// ``` +/// fir.do_loop %i_iv =

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] Simplify OpenMP device codegen (PR #137201)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/137201 After removing host operations from the device MLIR module, it is no longer necessary to provide special codegen logic to prevent these operations from causing compiler crashes or miscompilations. This patch r

[llvm-branch-commits] [flang] [Flang][OpenMP] Minimize host ops remaining in device compilation (PR #137200)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #137198 - #137199 - #137200 - #137201 https://github.com/llvm/llvm-project/pull/137200 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #137198 - #137199 - #137200 - #137201 https://github.com/llvm/llvm-project/pull/137199 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/137199 This patch adds assertions to map-related MLIR to LLVM IR translation functions and utils to explicitly document whether they are intended for host or device compilation only. Over time, map-related handling h

[llvm-branch-commits] [flang] [Flang][OpenMP] Minimize host ops remaining in device compilation (PR #137200)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/137200 This patch updates the function filtering OpenMP pass intended to remove host functions from the MLIR module created by Flang lowering when targeting an OpenMP target device. Host functions holding target regi

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)

2025-04-30 Thread Sergio Afonso via llvm-branch-commits
@@ -3623,6 +3623,9 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers( LLVM::ModuleTranslation &moduleTranslation, llvm::IRBuilderBase &builder, llvm::OpenMPIRBuilder &ompBuilder, DataLayout &dl, MapInfosTy &combinedInfo, MapInfoData &mapData, uin

[llvm-branch-commits] [flang] [Flang][OpenMP] Minimize host ops remaining in device compilation (PR #137200)

2025-05-05 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/137200 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] Simplify OpenMP device codegen (PR #137201)

2025-05-05 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/137201 >From 22f22aa0ca2c98dfcc48a70f2f7e0a5b68d7b1d9 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 22 Apr 2025 12:04:45 +0100 Subject: [PATCH] [MLIR][OpenMP] Simplify OpenMP device codegen After removing ho

[llvm-branch-commits] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancellation_point to LLVMIR (PR #137205)

2025-05-06 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak approved this pull request. LGTM too, thanks! https://github.com/llvm/llvm-project/pull/137205 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branc

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: This PR is based on the following analysis of the current state of OpenMP map translation to LLVM IR. If there are any issues with this PR, they are likely easier to spot on this graph: ![MapInfoData uses](https://github.com/user-attachments/assets/f9f56688-51e5-4ab4-be7c-39b3de

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] Simplify OpenMP device codegen (PR #137201)

2025-04-24 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #137198 - #137199 - #137200 - #137201 https://github.com/llvm/llvm-project/pull/137201 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit

[llvm-branch-commits] [flang] [Flang][OpenMP] Minimize host ops remaining in device compilation (PR #137200)

2025-04-29 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/137200 >From 6b734e2277969eeb200a292679c173c713b303f6 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 15 Apr 2025 16:59:18 +0100 Subject: [PATCH 1/2] [Flang][OpenMP] Minimize host ops remaining in device compi

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Assert on map translation functions, NFC (PR #137199)

2025-04-29 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/137199 >From 6ea52bf1986b5bba68d4d797590156daa38a4269 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Fri, 11 Apr 2025 13:40:14 +0100 Subject: [PATCH] [MLIR][OpenMP] Assert on map translation functions, NFC This pa

[llvm-branch-commits] [flang] [mlir] [MLIR][OpenMP] Simplify OpenMP device codegen (PR #137201)

2025-04-29 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/137201 >From c86caed6b80bdd4ed4edeb77f65116584e61b83b Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 22 Apr 2025 12:04:45 +0100 Subject: [PATCH] [MLIR][OpenMP] Simplify OpenMP device codegen After removing ho

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] cancel(lation point) taskgroup LLVMIR (PR #137841)

2025-05-07 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak approved this pull request. Thank you, this LGTM. I just have a non-blocking suggestion. https://github.com/llvm/llvm-project/pull/137841 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.l

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -3745,17 +3842,33 @@ convertOmpTargetData(Operation *op, llvm::IRBuilderBase &builder, return builder.saveIP(); }; + auto customMapperCB = + [&](unsigned int i) -> llvm::Expected { +llvm::Function *mapperFunc = nullptr; +if (combinedInfo.Mappers[i]) { +

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -3529,6 +3549,86 @@ static void genMapInfos(llvm::IRBuilderBase &builder, } } +static llvm::Expected +emitUserDefinedMapper(Operation *declMapperOp, llvm::IRBuilderBase &builder, + LLVM::ModuleTranslation &moduleTranslation); + +static llvm::Expected

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -3529,6 +3549,86 @@ static void genMapInfos(llvm::IRBuilderBase &builder, } } +static llvm::Expected +emitUserDefinedMapper(Operation *declMapperOp, llvm::IRBuilderBase &builder, + LLVM::ModuleTranslation &moduleTranslation); + +static llvm::Expected

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak commented: Thanks again Akash. I have a couple of small code simplification suggestions and nits, but otherwise LGTM. https://github.com/llvm/llvm-project/pull/124746 ___ llvm-branch-commits mailing list llvm-branch-commits@

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -4673,7 +4804,8 @@ convertHostOrTargetOperation(Operation *op, llvm::IRBuilderBase &builder, .Case([&](omp::TaskwaitOp op) { return convertOmpTaskwaitOp(op, builder, moduleTranslation); }) - .Casehttps://github.com/llvm/llvm-project/pull/124746

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -3529,6 +3549,84 @@ static void genMapInfos(llvm::IRBuilderBase &builder, } } +static llvm::Expected +emitUserDefinedMapper(Operation *declMapperOp, llvm::IRBuilderBase &builder, + LLVM::ModuleTranslation &moduleTranslation); + +static llvm::Expected

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,47 @@ +! Offloading test checking lowering of arrays with dynamic extents. +! REQUIRES: flang, amdgpu + +! RUN: %libomptarget-compile-fortran-run-and-check-generic + +program test_openmp_mapper + implicit none + integer, parameter :: n = 1024 + type :: mytype +

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -8130,17 +8135,19 @@ Function *OpenMPIRBuilder::emitUserDefinedMapper( Value *OffloadingArgs[] = {MapperHandle, CurBaseArg, CurBeginArg, CurSizeArg, CurMapType, CurNameArg}; -Function *ChildMapperFn = nullptr; -if (CustomMapperCB

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
@@ -4438,15 +4551,33 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder, findAllocaInsertPoint(builder, moduleTranslation); llvm::OpenMPIRBuilder::LocationDescription ompLoc(builder); + llvm::OpenMPIRBuilder::TargetDataInfo info( + /*RequiresDev

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-17 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak 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

[llvm-branch-commits] [clang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-18 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak approved this pull request. 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

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Host lowering of standalone distribute (PR #127817)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127817 This patch adds MLIR to LLVM IR translation support for standalone `omp.distribute` operations, as well as `distribute simd` through ignoring SIMD information (similarly to `do/for simd`). >From 8ecbf3579bcff0

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Split calculation of canonical loop trip count, NFC (PR #127820)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127820 This patch splits off the calculation of canonical loop trip counts from the creation of canonical loops. This makes it possible to reuse this logic to, for instance, populate the `__tgt_target_kernel` runtime

[llvm-branch-commits] [flang] [Flang][OpenMP] Allow host evaluation of loop bounds for distribute (PR #127822)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127822 This patch adds `target teams distribute [simd]` and equivalent construct nests to the list of cases where loop bounds can be evaluated in the host, as they represent kernels for which the trip count must also

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Host lowering of distribute-parallel-do/for (PR #127819)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127819 This patch adds support for translating composite `omp.parallel` + `omp.distribute` + `omp.wsloop` loops to LLVM IR on the host. This is done by passing an updated `WorksharingLoopType` to the call to `applyWor

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Add support for distribute constructs (PR #127816)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127816 This patch adds the `OpenMPIRBuilder::createDistribute()` function and updates `OpenMPIRBuilder::applyStaticWorkshareLoop()` in preparation for adding `distribute` support to flang. >From a79b7a2d6a443ef26bf4b

[llvm-branch-commits] [flang] [Flang][OpenMP] Allow host evaluation of loop bounds for distribute (PR #127822)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - #127817 - #127818 - #127819 - #127820 - #127821 - :arrow_right: #127822 https://github.com/llvm/llvm-project/pull/127822 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Add support for distribute constructs (PR #127816)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - :arrow_right: #127816 - #127817 - #127818 - #127819 - #127820 - #127821 - #127822 https://github.com/llvm/llvm-project/pull/127816 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Host lowering of standalone distribute (PR #127817)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - :arrow_right: #127817 - #127818 - #127819 - #127820 - #127821 - #127822 https://github.com/llvm/llvm-project/pull/127817 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Support target SPMD (PR #127821)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - #127817 - #127818 - #127819 - #127820 - :arrow_right: #127821 - #127822 https://github.com/llvm/llvm-project/pull/127821 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Host lowering of distribute-parallel-do/for (PR #127819)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - #127817 - #127818 - :arrow_right: #127819 - #127820 - #127821 - #127822 https://github.com/llvm/llvm-project/pull/127819 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Split calculation of canonical loop trip count, NFC (PR #127820)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - #127817 - #127818 - #127819 - :arrow_right: #127820 - #127821 - #127822 https://github.com/llvm/llvm-project/pull/127820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Add support for distribute-parallel-for/do constructs (PR #127818)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127818 This patch adds codegen for `kmpc_dist_for_static_init` runtime calls, used to support worksharing a single loop across teams and threads. This can be used to implement `distribute parallel for/do` support. >F

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Support target SPMD (PR #127821)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/127821 This patch implements MLIR to LLVM IR translation of host-evaluated loop bounds, completing initial support for `target teams distribute parallel do [simd]` and `target teams distribute [simd]`. >From 33409d2b

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-10 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,45 @@ +! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=host %s -o - \ +! RUN: | FileCheck %s + +program main +implicit none + +call foo(10) + +contains +subroutine foo(n) +implicit none +integer :: n +

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-10 Thread Sergio Afonso via llvm-branch-commits
@@ -152,26 +199,140 @@ class DoConcurrentConversion : public mlir::OpConversionPattern { public: using mlir::OpConversionPattern::OpConversionPattern; - DoConcurrentConversion(mlir::MLIRContext *context, bool mapToDevice) - : OpConversionPattern(context), mapToDevice(

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-10 Thread Sergio Afonso via llvm-branch-commits
@@ -24,7 +25,50 @@ namespace flangomp { namespace { namespace looputils { -using LoopNest = llvm::SetVector; +/// Stores info needed about the induction/iteration variable for each `do +/// concurrent` in a loop nest. +struct InductionVariableInfo { + /// the operation alloca

[llvm-branch-commits] [mlir] [MLIR][OpenMP] Minor improvements to BlockArgOpenMPOpInterface, NFC (PR #130789)

2025-03-11 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak created https://github.com/llvm/llvm-project/pull/130789 This patch introduces a use for the new `getBlockArgsPairs` to avoid having to manually list each applicable clause. Also, the `numClauseBlockArgs()` function is introduced, which simplifies the implementation

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,45 @@ +! Tests that if `do concurrent` is not perfectly nested in its parent loop, that +! we skip converting the not-perfectly nested `do concurrent` loop. + +! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=host %s -o - \ +! RUN: | FileCheck %s + +p

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-11 Thread Sergio Afonso via llvm-branch-commits
@@ -24,7 +25,50 @@ namespace flangomp { namespace { namespace looputils { -using LoopNest = llvm::SetVector; +/// Stores info needed about the induction/iteration variable for each `do +/// concurrent` in a loop nest. +struct InductionVariableInfo { + /// the operation alloca

[llvm-branch-commits] [mlir] [flang][OpenMP] Translate OpenMP scopes when compiling for target device (PR #130078)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
@@ -5255,6 +5283,51 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder, return WalkResult::interrupt(); return WalkResult::skip(); } + + // Non-target ops might nest target-related ops, therefore, we + //

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/127633 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
@@ -24,7 +25,67 @@ namespace flangomp { namespace { namespace looputils { -using LoopNest = llvm::SetVector; +/// Stores info needed about the induction/iteration variable for each `do +/// concurrent` in a loop nest. +struct InductionVariableInfo { + /// The operation alloca

[llvm-branch-commits] [mlir] [flang][OpenMP] Translate OpenMP scopes when compiling for target device (PR #130078)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
@@ -5315,6 +5320,46 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder, return WalkResult::interrupt(); return WalkResult::skip(); } + + // Non-target ops might nest target-related ops, therefore, we + //

[llvm-branch-commits] [mlir] [flang][OpenMP] Translate OpenMP scopes when compiling for target device (PR #130078)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
@@ -5255,6 +5283,51 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder, return WalkResult::interrupt(); return WalkResult::skip(); } + + // Non-target ops might nest target-related ops, therefore, we + //

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-03-12 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak approved this pull request. Thank you, LGTM! https://github.com/llvm/llvm-project/pull/127633 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch

[llvm-branch-commits] [llvm] [OpenMPIRBuilder] Add support for distribute-parallel-for/do constructs (PR #127818)

2025-02-19 Thread Sergio Afonso via llvm-branch-commits
skatrak wrote: PR stack: - #115475 - #127217 - #127816 - #127817 - :arrow_right: #127818 - #127819 - #127820 - #127821 - #127822 https://github.com/llvm/llvm-project/pull/127818 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org ht

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -102,6 +105,47 @@ mlir::Operation *findLoopIterationVarMemDecl(fir::DoLoopOp doLoop) { return result.getDefiningOp(); } +/// Collects the op(s) responsible for updating a loop's iteration variable with +/// the current iteration number. For example, for the input IR: +/

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/127634 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -102,6 +105,47 @@ mlir::Operation *findLoopIterationVarMemDecl(fir::DoLoopOp doLoop) { return result.getDefiningOp(); } +/// Collects the op(s) responsible for updating a loop's iteration variable with +/// the current iteration number. For example, for the input IR: --

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -102,6 +105,47 @@ mlir::Operation *findLoopIterationVarMemDecl(fir::DoLoopOp doLoop) { return result.getDefiningOp(); } +/// Collects the op(s) responsible for updating a loop's iteration variable with +/// the current iteration number. For example, for the input IR: +/

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -30,6 +30,9 @@ namespace looputils { struct InductionVariableInfo { /// the operation allocating memory for iteration variable, mlir::Operation *iterVarMemDef; + /// the operation(s) updating the iteration variable with the current + /// iteration number. + llvm::SetV

[llvm-branch-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak commented: Thank you Kareem, some small comments from me. https://github.com/llvm/llvm-project/pull/127634 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -152,26 +231,136 @@ class DoConcurrentConversion : public mlir::OpConversionPattern { public: using mlir::OpConversionPattern::OpConversionPattern; - DoConcurrentConversion(mlir::MLIRContext *context, bool mapToDevice) - : OpConversionPattern(context), mapToDevice(

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -202,6 +202,57 @@ variables: `i` and `j`. These are locally allocated inside the parallel/target OpenMP region similar to what the single-range example in previous section shows. +### Data environment + +By default, variables that are used inside a `do concurrent` loop nes

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak approved this pull request. I have a couple of nits, but LGTM otherwise. Thank you! https://github.com/llvm/llvm-project/pull/127635 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.o

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -361,6 +361,64 @@ void sinkLoopIVArgs(mlir::ConversionPatternRewriter &rewriter, ++idx; } } + +/// Collects values that are local to a loop: "loop-local values". A loop-local +/// value is one that is used exclusively inside the loop but allocated outside +/// of it.

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/127635 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -361,6 +361,64 @@ void sinkLoopIVArgs(mlir::ConversionPatternRewriter &rewriter, ++idx; } } + +/// Collects values that are local to a loop: "loop-local values". A loop-local +/// value is one that is used exclusively inside the loop but allocated outside +/// of it.

[llvm-branch-commits] [flang] [flang][OpenMP] Handle "loop-local values" in `do concurrent` nests (PR #127635)

2025-02-21 Thread Sergio Afonso via llvm-branch-commits
@@ -202,6 +202,57 @@ variables: `i` and `j`. These are locally allocated inside the parallel/target OpenMP region similar to what the single-range example in previous section shows. +### Data environment + +By default, variables that are used inside a `do concurrent` loop nes

<    1   2   3   4   5   6   7   >