[all-commits] [llvm/llvm-project] a5f77a: [flang][openacc] map data operand results to symbo...
jeanPerier via All-commits
all-commits at lists.llvm.org
Tue Oct 7 08:33:24 PDT 2025
Branch: refs/heads/users/jeanPerier/remap_openacc_data
Home: https://github.com/llvm/llvm-project
Commit: a5f77a654142f43d0de7a8ca421824986ed0475b
https://github.com/llvm/llvm-project/commit/a5f77a654142f43d0de7a8ca421824986ed0475b
Author: Jean Perier <jperier at nvidia.com>
Date: 2025-10-07 (Tue, 07 Oct 2025)
Changed paths:
M flang/include/flang/Lower/AbstractConverter.h
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/OpenACC.cpp
A flang/test/Lower/OpenACC/acc-data-operands-remapping.f90
M flang/test/Lower/OpenACC/acc-firstprivate-derived-allocatable-component.f90
M flang/test/Lower/OpenACC/acc-firstprivate-derived-pointer-component.f90
M flang/test/Lower/OpenACC/acc-firstprivate-derived-user-assign.f90
M flang/test/Lower/OpenACC/acc-firstprivate-derived.f90
M flang/test/Lower/OpenACC/acc-loop-exit.f90
M flang/test/Lower/OpenACC/acc-private.f90
M flang/test/Lower/OpenACC/do-loops-to-acc-loops.f90
Log Message:
-----------
[flang][openacc] map data operand results to symbols inside compute region
Variable references inside OpenACC compute and loop region were currently
always lowered to usages of the same SSA values than in the host thread,
even for variables that appear in data clauses and for which acc data
operations are created.
This makes it a non-trivial task to identify implicit data usages vs usage
of data appearing in clauses because the SSA addresses used in the region
may have a non-trivial SSA relationship with the SSA addresses used as
inputs of the data operations, especially after CSE runs that may merge
component or array element addressing operations with similar addressing
on the host thread (fir.coordinate/hlfir.designate).
This patch updates OpenACC lowering to remap the Symbol that appear in
data clauses to the related acc data operation result for the scope of
the compute or loop region.
To allow FIR passes to reason about these addresses, a new hlfir.declare
operation is created with the acc data operation result. This gives access
to the shape, contiguity, attributes, and dummy argument relationships inside
the region without having FIR extended to understand the data operations.
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