[all-commits] [llvm/llvm-project] 0e9b39: [flang][OpenMP] Lower target in_reduction for host...

Sairudra More via All-commits all-commits at lists.llvm.org
Fri Jun 19 01:40:55 PDT 2026


  Branch: refs/heads/users/saieiei/target-in-reduction
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e9b39be78b182f8337a706a7795d002d995bea8
      https://github.com/llvm/llvm-project/commit/0e9b39be78b182f8337a706a7795d002d995bea8
  Author: Sairudra More <sairudra60 at gmail.com>
  Date:   2026-06-19 (Fri, 19 Jun 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-llvmir.f90
    A flang/test/Lower/OpenMP/target-inreduction-unused.f90
    A 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
    A mlir/test/Target/LLVMIR/openmp-target-in-reduction-multi.mlir
    A mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
    M mlir/test/Target/LLVMIR/openmp-todo.mlir

  Log Message:
  -----------
  [flang][OpenMP] Lower target in_reduction for host fallback

Enable host-fallback lowering for target in_reduction in Flang and MLIR OpenMP translation.

Model target in_reduction through the matching map entry, force address-preserving implicit mapping for Flang in_reduction list items, and emit the host-side task-reduction lookup with __kmpc_task_reduction_get_th_data. The runtime entry point takes and returns a generic, default-address-space pointer, so normalize a non-default-address-space captured pointer to the generic address space before the call and cast the returned private pointer back to the map block argument's address space, mirroring the in_reduction handling on omp.taskloop. Unsupported device/offload-entry and richer reduction forms remain diagnosed.

Add Flang lowering, MLIR verifier/translation, and LLVM IR tests for the supported host-fallback path, including a non-default-address-space case, and the remaining unsupported cases.



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