[all-commits] [llvm/llvm-project] 00b135: [Flang][OpenMP] Support declare reduction without ...
Sunil Shrestha via All-commits
all-commits at lists.llvm.org
Wed May 27 09:34:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00b13536e3dad6c0d5e3bd54f49791c2a06707cc
https://github.com/llvm/llvm-project/commit/00b13536e3dad6c0d5e3bd54f49791c2a06707cc
Author: Sunil Shrestha <sunil.shrestha at hpe.com>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M flang/include/flang/Lower/ConvertVariable.h
M flang/include/flang/Lower/Support/PrivateReductionUtils.h
M flang/lib/Lower/ConvertVariable.cpp
M flang/lib/Lower/OpenMP/ClauseProcessor.cpp
M flang/lib/Lower/OpenMP/OpenMP.cpp
M flang/lib/Lower/Support/PrivateReductionUtils.cpp
M flang/test/Lower/OpenMP/Todo/omp-declare-reduction-advanced-types.f90
M flang/test/Lower/OpenMP/Todo/reduction-character-dynamic-length.f90
A flang/test/Lower/OpenMP/declare-reduction-no-initializer-derived.f90
A flang/test/Lower/OpenMP/declare-reduction-no-initializer-intrinsic.f90
A flang/test/Lower/OpenMP/declare-reduction-no-initializer-target-derived.f90
A flang/test/Lower/OpenMP/declare-reduction-no-initializer-unsupported.f90
A flang/test/Lower/OpenMP/declare-reduction-target-intrinsic.f90
Log Message:
-----------
[Flang][OpenMP] Support declare reduction without initializer (#196211)
For declare reduction without an explicit initializer clause, the init
callback now handles initialization inline rather than relying on the
_FortranAInitialize runtime call, which is available on the device
runtime but has known issues on GPU targets.
The initialization logic first checks whether an initializer clause is
present. If one is provided, it is used directly. Otherwise, for derived
types, the code checks whether the type has default component
initialization. If it does, each component is initialized inline:
components with explicit default values use those values, components
that are themselves derived types with defaults are recursively
initialized, and components without any default are zero-initialized.
Derived types with allocatable components that require runtime
initialization are guarded by a TODO.
Assisted by: Claude Opus 4.6
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