[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-05 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/125307 ___ 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 directive arguments in OmpDirectiveSpecifier (PR #124278)

2025-02-03 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/124278 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm

[llvm-branch-commits] [flang] [flang][OpenMP] Parse METADIRECTIVE in specification part (PR #123397)

2025-02-03 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/123397 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm

[llvm-branch-commits] [mlir] [mlir][OpenMP] initialize (first)private variables before task exec (PR #125304)

2025-01-31 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/125304 This still doesn't fix the memory safety issues because the stack allocations created here for the private variables might go out of scope. I will add a more complete lit test later in this patch series. >From c

[llvm-branch-commits] [mlir] WIP: [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-01-31 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/125307 See RFC: https://discourse.llvm.org/t/rfc-openmp-supporting-delayed-task-execution-with-firstprivate-variables/83084 The aim here is to ensure that tasks which are not executed for a while after they are created

[llvm-branch-commits] [mlir] [mlir][OpenMP] initialize (first)private variables before task exec (PR #125304)

2025-01-31 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Pull requests in this stack: 1. https://github.com/llvm/llvm-project/pull/125303 2. https://github.com/llvm/llvm-project/pull/125304 3. https://github.com/llvm/llvm-project/pull/125307 https://github.com/llvm/llvm-project/pull/125304 ___

[llvm-branch-commits] [mlir] WIP: [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-01-31 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Pull requests in this stack: 1. https://github.com/llvm/llvm-project/pull/125303 2. https://github.com/llvm/llvm-project/pull/125304 3. https://github.com/llvm/llvm-project/pull/125307 https://github.com/llvm/llvm-project/pull/125307 ___

[llvm-branch-commits] [flang] [flang] handle fir.call in AliasAnalysis::getModRef (PR #117164)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
@@ -329,14 +341,92 @@ AliasResult AliasAnalysis::alias(Source lhsSrc, Source rhsSrc, mlir::Value lhs, // AliasAnalysis: getModRef //===--===// +static bool isSavedLocal(const fir::AliasAnalysis::Source &src)

[llvm-branch-commits] [flang] [flang] handle fir.call in AliasAnalysis::getModRef (PR #117164)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/117164 ___ 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] handle fir.call in AliasAnalysis::getModRef (PR #117164)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
@@ -329,14 +341,92 @@ AliasResult AliasAnalysis::alias(Source lhsSrc, Source rhsSrc, mlir::Value lhs, // AliasAnalysis: getModRef //===--===// +static bool isSavedLocal(const fir::AliasAnalysis::Source &src)

[llvm-branch-commits] [flang] [flang] handle fir.call in AliasAnalysis::getModRef (PR #117164)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
@@ -329,14 +341,92 @@ AliasResult AliasAnalysis::alias(Source lhsSrc, Source rhsSrc, mlir::Value lhs, // AliasAnalysis: getModRef //===--===// +static bool isSavedLocal(const fir::AliasAnalysis::Source &src)

[llvm-branch-commits] [flang] [flang] handle fir.call in AliasAnalysis::getModRef (PR #117164)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. Looks great to me. I have reviewed that this does implement the language rules you mentioned in the description (which match my understanding). Please wait for Peter to check those before merging. https://github.com/llvm/llvm-project/pull/11

[llvm-branch-commits] [flang] [flang][OpenMP] Use new modifier code in ORDER and SCHEDULE clauses (PR #117081)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
@@ -153,6 +153,16 @@ std::optional maybeApply(FuncTy &&func, return std::move(func(*arg)); } +template < +typename FuncTy, // +typename ArgTy, // +typename ResultTy = std::invoke_result_t> +std::optional maybeApplyToV(FuncTy &&func, const ArgTy *arg) { + if (!a

[llvm-branch-commits] [flang] [flang][OpenMP] Use new modifier code in ORDER and SCHEDULE clauses (PR #117081)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/117081 ___ 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] Use new modifier code in ORDER and SCHEDULE clauses (PR #117081)

2024-11-21 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117081 ___ 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][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-22 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/124019 ___ 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][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
tblah wrote: I'm not sure why the bot didn't run on this. @llvm/pr-subscribers-flang-openmp https://github.com/llvm/llvm-project/pull/124019 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/124019 ___ 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][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/124019 ___ 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][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
@@ -34,52 +34,48 @@ def PrivateClauseOp : OpenMP_Op<"private", [IsolatedFromAbove, RecipeInterface]> let description = [{ This operation provides a declaration of how to implement the [first]privatization of a variable. The dialect users should provide -informati

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
@@ -488,44 +559,34 @@ void DataSharingProcessor::doPrivatize(const semantics::Symbol *sym, mlir::OpBuilder::InsertionGuard guard(firOpBuilder); firOpBuilder.setInsertionPointToStart(moduleOp.getBody()); auto result = firOpBuilder.create( -symLoc, uniquePriv

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
@@ -55,15 +55,19 @@ class MapsForPrivatizedSymbolsPass std::underlying_type_t>( llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO); Operation *definingOp = var.getDefiningOp(); -auto declOp = llvm::dyn_cast_or_null(definingOp); -assert(declOp && -

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/124019 ___ 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][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
@@ -468,15 +505,49 @@ void DataSharingProcessor::doPrivatize(const semantics::Symbol *sym, lower::SymbolBox hsb = converter.lookupOneLevelUpSymbol(*sym); assert(hsb && "Host symbol box not found"); - mlir::Type symType = hsb.getAddr().getType(); + mlir::Value privVal =

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-23 Thread Tom Eccles via llvm-branch-commits
@@ -488,44 +559,34 @@ void DataSharingProcessor::doPrivatize(const semantics::Symbol *sym, mlir::OpBuilder::InsertionGuard guard(firOpBuilder); firOpBuilder.setInsertionPointToStart(moduleOp.getBody()); auto result = firOpBuilder.create( -symLoc, uniquePriv

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP][flang] make private variable allocation implicit in omp.private (PR #124019)

2025-01-24 Thread Tom Eccles via llvm-branch-commits
@@ -55,15 +55,19 @@ class MapsForPrivatizedSymbolsPass std::underlying_type_t>( llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO); Operation *definingOp = var.getDefiningOp(); -auto declOp = llvm::dyn_cast_or_null(definingOp); -assert(declOp && -

[llvm-branch-commits] [flang] [flang][OpenMP] Allow utility constructs in specification part (PR #121509)

2025-01-03 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. Looks great. Thanks! https://github.com/llvm/llvm-project/pull/121509 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bran

[llvm-branch-commits] [flang] [flang][OpenMP] Enable delayed privatization by default for `omp.distribute` (PR #131574)

2025-03-17 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Have you run any testsuites on this? If so please add that to the commit description. https://github.com/llvm/llvm-project/pull/131574 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[llvm-branch-commits] [mlir] [OpenMP][MLIR] Refactor code related to collecting privatizer info into a shared util (PR #131582)

2025-03-17 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. Nice cleanup. I think this is a NFC? Could you add that to the commit title LGTM https://github.com/llvm/llvm-project/pull/131582 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.

[llvm-branch-commits] [flang] [flang][OpenMP][HLFIR] Support vector subscripted array sections for DEPEND (PR #133892)

2025-04-07 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Ping for review. @vzakhari are you happy with the change to `hlfir.elemental_addr`? https://github.com/llvm/llvm-project/pull/133892 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[llvm-branch-commits] [flang] [flang][OpenMP] Use OmpMemoryOrderType enumeration in FAIL clause (PR #136313)

2025-04-22 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/136313 ___ 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] Use OmpMemoryOrderType enumeration in FAIL clause (PR #136313)

2025-04-22 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/136313 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [flang] [flang][OpenMP] Use OmpMemoryOrderType enumeration in FAIL clause (PR #136313)

2025-04-22 Thread Tom Eccles via llvm-branch-commits
@@ -4242,9 +4242,8 @@ struct OmpDeviceTypeClause { // OMP 5.2 15.8.3 extended-atomic, fail-clause -> //FAIL(memory-order) struct OmpFailClause { - WRAPPER_CLASS_BOILERPLATE( - OmpFailClause, common::Indirection); - CharBlock source; tblah wrote: Why

[llvm-branch-commits] [flang] [flang][OpenMP] Extend common::AtomicDefaultMemOrderType enumeration (PR #136312)

2025-04-22 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/136312 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

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

2025-04-24 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR Stack: - Cancel parallel https://github.com/llvm/llvm-project/pull/137192 - Cancel sections https://github.com/llvm/llvm-project/pull/137193 - Cancel wsloop https://github.com/llvm/llvm-project/pull/137194 - Cancellation point https://github.com/llvm/llvm-project/pull/137205 - Can

[llvm-branch-commits] [mlir] [mlir][OpenMP] convert wsloop cancellation to LLVMIR (PR #137194)

2025-04-24 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/137194 Taskloop support will follow in a later patch. >From bb374c9f98cb13e55c9ce7d129f567428e58c24e Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:05:50 + Subject: [PATCH] [mlir][OpenMP] conver

[llvm-branch-commits] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-24 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/137193 This is quite ugly but it is the best I could think of. The old FiniCBWrapper was way too brittle depending upon the exact block structure inside of the section, and could be confused by any control flow in the s

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

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137841 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[llvm-branch-commits] [flang] [flang][OpenMP] Update `do concurrent` mapping pass to use `fir.do_concurrent` op (PR #138489)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/138489 ___ 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] Update `do concurrent` mapping pass to use `fir.do_concurrent` op (PR #138489)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -548,19 +357,16 @@ class DoConcurrentConversionPass return; } -llvm::DenseSet concurrentLoopsToSkip; +llvm::DenseSet concurrentLoopsToSkip; tblah wrote: The correctness of this depends upon the traversal order used by `applyFullConversio

[llvm-branch-commits] [flang] [flang][OpenMP] Update `do concurrent` mapping pass to use `fir.do_concurrent` op (PR #138489)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: Thanks, looks good. Just one comment. https://github.com/llvm/llvm-project/pull/138489 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bran

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -3485,6 +3485,137 @@ def fir_BoxTotalElementsOp let hasCanonicalizer = 1; } +def YieldOp : fir_Op<"yield", +[Pure, ReturnLike, Terminator, + ParentOneOf<["LocalitySpecifierOp"]>]> { + let summary = "loop yield and termination operation"; + let description = [{ +

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -3485,6 +3485,137 @@ def fir_BoxTotalElementsOp let hasCanonicalizer = 1; } +def YieldOp : fir_Op<"yield", +[Pure, ReturnLike, Terminator, + ParentOneOf<["LocalitySpecifierOp"]>]> { + let summary = "loop yield and termination operation"; + let description = [{ +

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: Please could you add a test for the verifier failures. https://github.com/llvm/llvm-project/pull/138505 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/138505 ___ 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][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -3485,6 +3485,137 @@ def fir_BoxTotalElementsOp let hasCanonicalizer = 1; } +def YieldOp : fir_Op<"yield", +[Pure, ReturnLike, Terminator, + ParentOneOf<["LocalitySpecifierOp"]>]> { + let summary = "loop yield and termination operation"; + let description = [{ +

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -3485,6 +3485,137 @@ def fir_BoxTotalElementsOp let hasCanonicalizer = 1; } +def YieldOp : fir_Op<"yield", tblah wrote: What about the locallity specifiers requires a different terminator? Couldn't this use `fir.result`? https://github.com/llvm/llvm-pr

[llvm-branch-commits] [flang] [flang][fir] Add locality specifiers modeling to `fir.do_concurrent.loop` (PR #138506)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/138506 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [flang] [flang][fir] Basic lowering `fir.do_concurrent` locality specs to `fir.do_loop ... unordered` (PR #138512)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/138512 ___ 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][fir] Basic lowering `fir.do_concurrent` locality specs to `fir.do_loop ... unordered` (PR #138512)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
@@ -162,7 +173,52 @@ class DoConcurrentConversion assert(loop.getRegion().hasOneBlock()); mlir::Block &loopBlock = loop.getRegion().getBlocks().front(); -// Collect iteration variable(s) allocations do that we can move them +// Handle localization +if (!loo

[llvm-branch-commits] [flang] [flang][fir] Basic lowering `fir.do_concurrent` locality specs to `fir.do_loop ... unordered` (PR #138512)

2025-05-06 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: This needs a TODO message for locality specifiers which are not yet supported (as I understand it this means ones with init or dealloc regions) https://github.com/llvm/llvm-project/pull/138512 ___ llvm-branch-commit

[llvm-branch-commits] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-25 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137193 >From 4d28bd8f0106321af6679e9b155fd36ef2f919fc Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 10 Apr 2025 11:43:18 + Subject: [PATCH] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR This is quite u

[llvm-branch-commits] [mlir] [mlir][OpenMP] convert wsloop cancellation to LLVMIR (PR #137194)

2025-04-25 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137194 >From bb1af0154c62a622775f0f05cbdc486de69266c9 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:05:50 + Subject: [PATCH] [mlir][OpenMP] convert wsloop cancellation to LLVMIR Taskloop suppor

[llvm-branch-commits] [mlir] [mlir][OpenMP] convert wsloop cancellation to LLVMIR (PR #137194)

2025-04-24 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR Stack: - Cancel parallel https://github.com/llvm/llvm-project/pull/137192 - Cancel sections https://github.com/llvm/llvm-project/pull/137193 - Cancel wsloop https://github.com/llvm/llvm-project/pull/137194 - Cancellation point (TODO) - Cancel(lation point) taskgroup (TODO) https:

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

2025-04-24 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/137205 This is basically identical to cancel except without the if clause. taskgroup will be implemented in a followup PR. >From 88fc39d0b2a3a846006889d4320b9f29ced025b7 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date:

[llvm-branch-commits] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-24 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR Stack: Cancel parallel https://github.com/llvm/llvm-project/pull/137192 Cancel sections https://github.com/llvm/llvm-project/pull/137193 Cancel wsloop https://github.com/llvm/llvm-project/pull/137194 Cancellation point (TODO) Cancel(lation point) taskgroup (TODO) https://g

[llvm-branch-commits] [flang] [flang][OpenACC][OpenMP] Separate implementations of ATOMIC constructs (PR #137517)

2025-04-28 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM. If I didn't miss anything, this patch copies the old header code verbatim into both implementation files? https://github.com/llvm/llvm-project/pull/137517 ___ llvm-branch-commits mailing list

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

2025-04-28 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137205 >From 1c6d8d0fc688dcd630b7077d2e7ae190a6c62361 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:40:39 + Subject: [PATCH] [mlir][OpenMP] Convert omp.cancellation_point to LLVMIR This is basi

[llvm-branch-commits] [mlir] [mlir][OpenMP] convert wsloop cancellation to LLVMIR (PR #137194)

2025-04-28 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137194 >From 9a8ed32eaea1a5b6a55e32b5b97f890a1fb8ecf9 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:05:50 + Subject: [PATCH] [mlir][OpenMP] convert wsloop cancellation to LLVMIR Taskloop suppor

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

2025-04-28 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Thanks for taking a look Michael. I think the issue was actually in an earlier patch in my series, but the UB was only triggering intermittently. The fix for Windows builds is https://github.com/llvm/llvm-project/pull/137193/commits/6c678b739d4fab204862ee057e00c3b0cc4c1946 https:

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

2025-04-28 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137205 >From 1c6d8d0fc688dcd630b7077d2e7ae190a6c62361 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:40:39 + Subject: [PATCH 1/2] [mlir][OpenMP] Convert omp.cancellation_point to LLVMIR This is

[llvm-branch-commits] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-26 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137193 >From f3b8eebb37320ab748682f6a091e52e64aeec0d7 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 10 Apr 2025 11:43:18 + Subject: [PATCH] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR This is quite u

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

2025-04-26 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137205 >From 4e97789c831bbfbfe85a9df7420df65de036b09a Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:40:39 + Subject: [PATCH] [mlir][OpenMP] Convert omp.cancellation_point to LLVMIR This is basi

[llvm-branch-commits] [mlir] [mlir][OpenMP] convert wsloop cancellation to LLVMIR (PR #137194)

2025-04-26 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137194 >From 3a198c8800f519b4a88772c93c52b7fd08ccb131 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:05:50 + Subject: [PATCH] [mlir][OpenMP] convert wsloop cancellation to LLVMIR Taskloop suppor

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

2025-04-28 Thread Tom Eccles via llvm-branch-commits
tblah wrote: The new testsuite failures look unrelated to my patch 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-branch-comm

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

2025-04-29 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR Stack: - Cancel parallel https://github.com/llvm/llvm-project/pull/137192 - Cancel sections https://github.com/llvm/llvm-project/pull/137193 - Cancel wsloop https://github.com/llvm/llvm-project/pull/137194 - Cancellation point https://github.com/llvm/llvm-project/pull/137205 - Can

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

2025-04-29 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/137205 >From 7fbe43d895479254287466b957daa7747849e627 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 15 Apr 2025 15:40:39 + Subject: [PATCH 1/2] [mlir][OpenMP] Convert omp.cancellation_point to LLVMIR This is

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

2025-04-29 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/137841 A cancel or cancellation point for taskgroup is always nested inside of a task inside of the taskgroup. For the task which is cancelled, it is that task which needs to be cleaned up: not the owning taskgroup. The

[llvm-branch-commits] [flang] [flang][fir] Add `fir.local` op for locality specifiers (PR #138505)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. Thanks for the updates https://github.com/llvm/llvm-project/pull/138505 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br

[llvm-branch-commits] [flang] [flang][fir] Basic lowering `fir.do_concurrent` locality specs to `fir.do_loop ... unordered` (PR #138512)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
@@ -162,7 +173,52 @@ class DoConcurrentConversion assert(loop.getRegion().hasOneBlock()); mlir::Block &loopBlock = loop.getRegion().getBlocks().front(); -// Collect iteration variable(s) allocations do that we can move them +// Handle localization +if (!loo

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

2025-02-19 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/127820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm

[llvm-branch-commits] [flang] Reland " [flang] Rely on global initialization for simpler derived types" (PR #130290)

2025-03-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. Thank you for the quick fix. This does fix the issue I saw. https://github.com/llvm/llvm-project/pull/130290 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm

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

2025-03-11 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/130789 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [flang] release/20.x: [flang] fix AArch64 PCS for struct following pointer (#127802) (PR #128518)

2025-02-25 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/128518 ___ 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] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/125307 >From df47461dcf1f9244da472efdcc57d266ecd42b34 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Fri, 24 Jan 2025 17:32:41 + Subject: [PATCH 01/11] [mlir][OpenMP] Pack task private variables into a heap-allocat

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -146,13 +146,24 @@ def PrivateClauseOp : OpenMP_Op<"private", [IsolatedFromAbove, RecipeInterface]> return region.empty() ? nullptr : region.getArgument(0); } +/// Returns true if the init region might read from the mold argument +bool initReadsFromMold()

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1415,11 +1413,13 @@ static llvm::Expected allocateAndInitPrivateVars( llvm::Value *llvmPrivateVar = builder.CreateAlloca( llvmAllocType, /*ArraySize=*/nullptr, "omp.private.alloc"); -llvm::Error err = initPrivateVar( +llvm::Expected privateVarOrError =

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1331,19 +1334,16 @@ findAssociatedValue(Value privateVar, llvm::IRBuilderBase &builder, /// Initialize a single (first)private variable. You probably want to use /// allocateAndInitPrivateVars instead of this. -static llvm::Error -initPrivateVar(llvm::IRBuilderBase &build

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
@@ -1794,37 +1909,118 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder, moduleTranslation, allocaIP); // Allocate and initialize private variables - // TODO: package private variables up in a structure builder.SetInsertPoint(initBlock->getTermi

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
tblah wrote: This is now rebased on top of current main and ready for review. Apologies for the delay, I was on holiday and rebasing required rethinking how insertion points worked. @ergawy I changed the signature of `initPrivateVar` so that the correct private variable SSA value is returned

[llvm-branch-commits] [flang] release/20.x: [flang] fix AArch64 PCS for struct following pointer (#127802) (PR #128518)

2025-02-24 Thread Tom Eccles via llvm-branch-commits
tblah wrote: This looks good to me but I am unsure what the exact interpretation of the [rules](https://llvm.org/docs/HowToReleaseLLVM.html#release-patch-rules) should be. > Before RC3/Final Major Release Patches should be limited to critical bugs or > regressions. This is not fixing a regres

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-26 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/125307 >From df47461dcf1f9244da472efdcc57d266ecd42b34 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Fri, 24 Jan 2025 17:32:41 + Subject: [PATCH 01/12] [mlir][OpenMP] Pack task private variables into a heap-allocat

[llvm-branch-commits] [flang] [mlir] [mlir][OpenMP] Pack task private variables into a heap-allocated context struct (PR #125307)

2025-02-26 Thread Tom Eccles via llvm-branch-commits
tblah wrote: Apologies for the comments I missed. I'm not sure how that happened. Thanks for carefully checking each one. https://github.com/llvm/llvm-project/pull/125307 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://

[llvm-branch-commits] [flang] [flang][OpenMP] Update `do concurrent` mapping pass to use `fir.do_concurrent` op (PR #138489)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
@@ -548,19 +357,16 @@ class DoConcurrentConversionPass return; } -llvm::DenseSet concurrentLoopsToSkip; +llvm::DenseSet concurrentLoopsToSkip; tblah wrote: My concern was that the walk order might be changed some time because I didn't reali

[llvm-branch-commits] [flang] [flang][OpenMP] Update `do concurrent` mapping pass to use `fir.do_concurrent` op (PR #138489)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. https://github.com/llvm/llvm-project/pull/138489 ___ 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] Generlize names of delayed privatization CLI flags (PR #138816)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/138816 ___ 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][fir] Basic lowering `fir.do_concurrent` locality specs to `fir.do_loop ... unordered` (PR #138512)

2025-05-07 Thread Tom Eccles via llvm-branch-commits
@@ -162,7 +173,52 @@ class DoConcurrentConversion assert(loop.getRegion().hasOneBlock()); mlir::Block &loopBlock = loop.getRegion().getBlocks().front(); -// Collect iteration variable(s) allocations do that we can move them +// Handle localization +if (!loo

[llvm-branch-commits] [flang] [flang][fir] Basic PFT to MLIR lowering for do concurrent locality specifiers (PR #138534)

2025-05-09 Thread Tom Eccles via llvm-branch-commits
@@ -2029,9 +2031,30 @@ class FirConverter : public Fortran::lower::AbstractConverter { void handleLocalitySpecs(const IncrementLoopInfo &info) { Fortran::semantics::SemanticsContext &semanticsContext = bridge.getSemanticsContext(); -for (const Fortran::semant

[llvm-branch-commits] [flang] [flang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (PR #139131)

2025-05-09 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/139131 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm

[llvm-branch-commits] [mlir] [mlir][OpenMP] Add translation of private_barrier attr to LLVMIR (PR #140090)

2025-05-15 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/140090 Part of a series to fix https://github.com/llvm/llvm-project/issues/136357 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font

[llvm-branch-commits] [flang] [flang][OpenMP] use attribute for delayed privatization barrier (PR #140092)

2025-05-15 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/140092 Fixes #136357 The barrier needs to go between the copying into firstprivate variables and the initialization call for the OpenMP construct (e.g. wsloop). There is no way of expressing this in MLIR because for de

[llvm-branch-commits] [flang] [flang][OpenMP] use attribute for delayed privatization barrier (PR #140092)

2025-05-21 Thread Tom Eccles via llvm-branch-commits
tblah wrote: ping for review https://github.com/llvm/llvm-project/pull/140092 ___ 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] use attribute for delayed privatization barrier (PR #140092)

2025-05-15 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR stack: 1. https://github.com/llvm/llvm-project/pull/140089 2. https://github.com/llvm/llvm-project/pull/140090 3. https://github.com/llvm/llvm-project/pull/140092 https://github.com/llvm/llvm-project/pull/140092 ___ llvm-branch-commits

[llvm-branch-commits] [mlir] [mlir][OpenMP] Add translation of private_barrier attr to LLVMIR (PR #140090)

2025-05-15 Thread Tom Eccles via llvm-branch-commits
tblah wrote: PR stack: 1. https://github.com/llvm/llvm-project/pull/140089 2. https://github.com/llvm/llvm-project/pull/140090 3. https://github.com/llvm/llvm-project/pull/140092 https://github.com/llvm/llvm-project/pull/140090 ___ llvm-branch-commits

[llvm-branch-commits] [llvm] [utils][TableGen] Handle versions on clause/directive spellings (PR #141766)

2025-05-29 Thread Tom Eccles via llvm-branch-commits
@@ -77,6 +77,19 @@ static std::string getIdentifierName(const Record *Rec, StringRef Prefix) { return Prefix.str() + BaseRecord(Rec).getFormattedName(); } +using RecordWithSpelling = std::pair; + +static std::vector +getSpellings(ArrayRef Records) { tblah w

<    1   2   3   4   >