[all-commits] [llvm/llvm-project] e92d57: [flang][OpenMP] Model target in_reduction through ...

Sairudra More via All-commits all-commits at lists.llvm.org
Tue Jun 9 08:56:38 PDT 2026


  Branch: refs/heads/users/saieiei/target-in-reduction
  Home:   https://github.com/llvm/llvm-project
  Commit: e92d576b09171adbc50baf0f1391df6f0fcd097d
      https://github.com/llvm/llvm-project/commit/e92d576b09171adbc50baf0f1391df6f0fcd097d
  Author: Sairudra More <moresair at pe31.hpc.amslabs.hpecorp.net>
  Date:   2026-06-09 (Tue, 09 Jun 2026)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/test/Lower/OpenMP/target-inreduction-unused.f90
    M flang/test/Lower/OpenMP/target-inreduction.f90
    M flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Dialect/OpenMP/invalid.mlir
    M mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  [flang][OpenMP] Model target in_reduction through map entries

Model omp.target in_reduction so the target body uses the mapped
map_entries block argument instead of a separate in_reduction entry
block argument.

The in_reduction operands remain on the op for host-side translation.
For the host-fallback path, the matching map block argument is redirected
to the pointer returned by __kmpc_task_reduction_get_th_data, so the
target body accumulates into the task reduction-private storage.

Flang lowering now relies on the implicit address-preserving map for the
target body binding, while task and taskloop keep their existing
in_reduction block-argument behavior.

Offload/device compilation is still diagnosed as not yet implemented, and
each target in_reduction variable must have a matching map_entries entry.



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