[flang-commits] [flang] [mlir] [flang][OpenMP] Lower task reduction modifier (PR #205124)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Jun 23 08:25:16 PDT 2026
================
@@ -4334,6 +4418,19 @@ convertOmpWsloop(Operation &opInst, llvm::IRBuilderBase &builder,
reductionVariableMap, isByRef, deferredStores)))
return failure();
+ // For `reduction(task, ...)` open a task-reduction scope for the worksharing
+ // loop. Participating explicit tasks accumulate into the per-thread private
+ // copies, which the worksharing reduction then combines across threads.
+ bool isTaskReductionMod =
+ wsloopOp.getReductionMod() == omp::ReductionModifier::task;
----------------
tblah wrote:
Check that the number of reduction args is greater than 0 as you did for parallel
https://github.com/llvm/llvm-project/pull/205124
More information about the flang-commits
mailing list