[flang][hlfir] Lower associate construct to HLFIR
authorJean Perier <jperier@nvidia.com>
Mon, 27 Feb 2023 08:05:11 +0000 (09:05 +0100)
committerJean Perier <jperier@nvidia.com>
Mon, 27 Feb 2023 08:05:41 +0000 (09:05 +0100)
commite5921ef021efa7e696421069d294d66e58df2541
tree29e1c7c35b0e5c973d0c55974fe5582a3fafe651
parent713b3ad43850ad9fc89b89f53ab37b54f744ec70
[flang][hlfir] Lower associate construct to HLFIR

- always use genExprAddr when lowering to HLFIR: it does not create
  temporary for array sections without vector subscripts, so there is
  no need to have custom logic.

- update mangling to deal with AssocDetailsEntity. Their name is
  required in HLFIR so that it can be added to the hlfir.declare
  that is created for the selector once it is lowered. This should
  allow getting debug info for selector when debug info are generated
  from hlfir.declare.

The rest of associate construct lowering is unchanged and shared with
the current lowering.

This patch also enables select type lowering to work properly, but some
other todos (mainly about parent component references) prevents porting
the tests for now, so this will be done later.

Differential Revision: https://reviews.llvm.org/D144740
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/Mangler.cpp
flang/test/Lower/HLFIR/associate-construct.f90 [new file with mode: 0644]