[all-commits] [llvm/llvm-project] 6c2853: [Flang][OpenMP] Properly bind arguments of composi...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Thu Oct 31 09:40:16 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c28530ed082204a1b6d20b45482e81d4cd5ead4
https://github.com/llvm/llvm-project/commit/6c28530ed082204a1b6d20b45482e81d4cd5ead4
Author: Sergio Afonso <safonsof at amd.com>
Date: 2024-10-31 (Thu, 31 Oct 2024)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/openmp-todo.mlir
Log Message:
-----------
[Flang][OpenMP] Properly bind arguments of composite operations (#113682)
When composite constructs are lowered, clauses for each leaf construct
are lowered before creating the set of loop wrapper operations, using
these outside values to populate their operand lists. Then, when the
loop nest associated to that composite construct is lowered, the binding
of Fortran symbols to the entry block arguments defined by these loop
wrappers is performed, resulting in the creation of `hlfir.declare`
operations in the entry block of the `omp.loop_nest`.
This approach prevents `hlfir.declare` operations related to the binding
and other operations resulting from the evaluation of the clauses from
being inserted between loop wrapper operations, which would be an
illegal MLIR representation. However, this introduces the problem of
entry block arguments defined by a wrapper that then should be used by
one of its nested wrappers, because the corresponding Fortran symbol
would still be mapped to an outside value at the time of gathering the
list of operands for the nested wrapper.
This patch adds operand re-mapping logic to update wrappers without
changing when clauses are evaluated or where the `hlfir.declare`
creation is performed.
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