[flang-commits] [clang] [flang] [llvm] [mlir] [OpenMP][flang] Add initial support for by-ref reductions on the GPU (PR #165714)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Wed Nov 5 05:20:54 PST 2025
================
@@ -1485,6 +1490,18 @@ class OpenMPIRBuilder {
/// reduction. If null, the implementation will use the non-atomic version
/// along with the appropriate synchronization mechanisms.
ReductionGenAtomicCBTy AtomicReductionGen;
+
+ /// For by-ref reductions, we need to keep track of 2 extra types that are
+ /// potentially different:
+ /// * The allocated type is the type of the storage allocated by the
+ /// reduction op's `alloc` region. For example, for allocatables and arrays,
+ /// this type would be the descriptor/box struct.
+ Type *ByRefAllocatedType;
+ /// * The by-ref element type is the type of the actual storage needed for
----------------
ergawy wrote:
Done.
https://github.com/llvm/llvm-project/pull/165714
More information about the flang-commits
mailing list