[all-commits] [llvm/llvm-project] dde579: [mlir][OpenMP] Translate task_reduction on omp.tas...
Sairudra More via All-commits
all-commits at lists.llvm.org
Thu Jun 18 07:52:32 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dde579becf31add55c5a473f28fd010df36d2490
https://github.com/llvm/llvm-project/commit/dde579becf31add55c5a473f28fd010df36d2490
Author: Sairudra More <sairudra60 at gmail.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
A mlir/test/Target/LLVMIR/openmp-taskgroup-task-reduction.mlir
M mlir/test/Target/LLVMIR/openmp-todo.mlir
Log Message:
-----------
[mlir][OpenMP] Translate task_reduction on omp.taskgroup (#199565)
This patch adds LLVM IR translation for `task_reduction` on
`omp.taskgroup`.
Flang already parses, checks, and lowers the relevant task-reduction
constructs to OpenMP MLIR, but the LLVM IR translation path was
incomplete. This patch implements the taskgroup reduction setup needed
by the follow-up taskloop and task `in_reduction` work.
For each reducer on `omp.taskgroup`, the translation emits init and
combiner helpers from the corresponding `omp.declare_reduction` regions,
builds the `kmp_taskred_input_t` descriptor array, and calls
`__kmpc_taskred_init` before entering the taskgroup body.
This patch intentionally keeps `reduction` / `in_reduction` on
`omp.taskloop.context` unsupported. Those are handled in follow-up PRs.
### Stack / review order
This PR is the first layer of the OpenMP task-reduction translation
stack:
1. #199565 — `omp.taskgroup task_reduction` translation
2. #199670 — `omp.taskloop` `reduction` / `in_reduction` translation
3. #202611 — explicit `omp.task in_reduction` translation
Related sibling follow-up:
* #199967 — `omp.target in_reduction` host-fallback lowering
The intended main review order is:
#199565 → #199670 → #202611
Please review this PR as the taskgroup `task_reduction` layer only. The
taskloop, explicit task, and target-specific pieces are split out so
each runtime lowering step can be reviewed separately.
Part of #199560.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list