You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flang][openacc] map data operand results to symbols inside compute region (#162306)
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.
0 commit comments