[all-commits] [llvm/llvm-project] b65655: [Flang][OpenMP] Properly bind arguments of composi...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Fri Oct 25 05:18:15 PDT 2024
Branch: refs/heads/users/skatrak/composite-blockargs-03-argsmapping
Home: https://github.com/llvm/llvm-project
Commit: b6565532e5a9484e03700e29c528938f8f4d5734
https://github.com/llvm/llvm-project/commit/b6565532e5a9484e03700e29c528938f8f4d5734
Author: Sergio Afonso <safonsof at amd.com>
Date: 2024-10-25 (Fri, 25 Oct 2024)
Changed paths:
M flang/lib/Lower/OpenMP/OpenMP.cpp
Log Message:
-----------
[Flang][OpenMP] Properly bind arguments of composite operations
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