[all-commits] [llvm/llvm-project] 45d6b3: [mlir][OpenMP] Translate task_reduction on taskgroup

Sairudra More via All-commits all-commits at lists.llvm.org
Thu Jun 11 02:23:53 PDT 2026


  Branch: refs/heads/users/saieiei/taskloop-reduction
  Home:   https://github.com/llvm/llvm-project
  Commit: 45d6b3ade0d77a0b63bf51e0f403b0eabf2b318f
      https://github.com/llvm/llvm-project/commit/45d6b3ade0d77a0b63bf51e0f403b0eabf2b318f
  Author: saieiei <sairudra60 at gmail.com>
  Date:   2026-06-11 (Thu, 11 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 taskgroup

Add LLVM IR translation support for the task_reduction clause on
omp.taskgroup.

The translation builds task-reduction descriptors for the listed reduction
variables and emits the runtime initialization before the taskgroup body.
The reducer init and combiner callbacks are generated from the corresponding
omp.declare_reduction regions.

This patch keeps taskloop reduction and in_reduction translation unsupported;
those remain follow-up work. Unsupported task_reduction forms are diagnosed
instead of being lowered incorrectly.

Add MLIR translation tests for taskgroup task_reduction, multiple reducers,
plain taskgroup translation, and remaining unsupported cases.


  Commit: 9081432d227e61a20f96385dda4ad09d1fa6bf84
      https://github.com/llvm/llvm-project/commit/9081432d227e61a20f96385dda4ad09d1fa6bf84
  Author: Sairudra More <sairudra60 at gmail.com>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/openmp-taskloop-reduction.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  [mlir][OpenMP] Translate reductions on taskloop

Add LLVM IR translation for reduction and in_reduction clauses on omp.taskloop.context.

For taskloop reduction, emit the implicit taskgroup reduction setup and map each generated task to runtime-provided private reduction storage through __kmpc_task_reduction_get_th_data. For in_reduction, use the same runtime lookup path with a null descriptor to join an enclosing task reduction context.

Unsupported byref, cleanup, and two-argument initializer forms remain diagnosed.

Add MLIR translation tests for the supported taskloop reduction and in_reduction cases.


Compare: https://github.com/llvm/llvm-project/compare/e5389deb990e...9081432d227e

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