[all-commits] [llvm/llvm-project] d7684c: [flang][OpenMP] Support in_reduction on target

Sairudra More via All-commits all-commits at lists.llvm.org
Wed May 27 07:01:40 PDT 2026


  Branch: refs/heads/users/saieiei/target-in-reduction
  Home:   https://github.com/llvm/llvm-project
  Commit: d7684c16f03499fc566455dbf1c3c2f3520c1676
      https://github.com/llvm/llvm-project/commit/d7684c16f03499fc566455dbf1c3c2f3520c1676
  Author: Sairudra More <sairudra60 at gmail.com>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    R flang/test/Lower/OpenMP/Todo/target-inreduction.f90
    A flang/test/Lower/OpenMP/target-inreduction-unused.f90
    A flang/test/Lower/OpenMP/target-inreduction.f90
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  [flang][OpenMP] Support in_reduction on target

Teach Flang lowering and MLIR OpenMP translation to carry
in_reduction through omp.target.

The translation looks up the task reduction-private storage with
__kmpc_task_reduction_get_th_data and binds the target region's
in_reduction block argument to that private pointer, so uses inside the
region do not keep referring to the original variable.

The patch also preserves in_reduction operands in the TargetOp builder
path and makes sure target in_reduction list items are mapped into the
target region when needed.



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