[all-commits] [llvm/llvm-project] 583d49: [flang][hlfir] Lower vector subscripted RHS design...
jeanPerier via All-commits
all-commits at lists.llvm.org
Wed May 3 00:25:07 PDT 2023
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-05-03 (Wed, 03 May 2023)
[flang][hlfir] Lower vector subscripted RHS designators
Lower vector subscripted designators as values when they appear outside
of the assignment left-hand side and input IO contexts.
This matches Fortran semantics where vector subscripted designators cannot
be written to outside of the two contexts mentioned above: they are
passed/taken by value where they appear.
This patch uses the added hlfir.element_addr to lower vector designators
in lowering. But when reaching the end of the designator lowering, the
hlfir.element_addr is turned into an hlfir.elemental when lowering is
not asking for the hlfir.elemental_addr.
This approach allows lowering vector subscripted in the same way in
while visiting the designator, and only adapt to the context at the
The part where lowering uses the hlfir.elemental_addr will be
done in further patch as it requires lowering assignments in the
new hlfir.region_assign op, and there is not codegen yet for these
Differential Revision: https://reviews.llvm.org/D149480
More information about the All-commits