This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Lower associate construct to HLFIR
ClosedPublic

Authored by jeanPerier on Feb 24 2023, 8:37 AM.

Details

Summary
  • 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.

Diff Detail

Event Timeline

jeanPerier created this revision.Feb 24 2023, 8:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2023, 8:37 AM
jeanPerier requested review of this revision.Feb 24 2023, 8:37 AM
PeteSteinfeld accepted this revision.Feb 24 2023, 9:07 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Feb 24 2023, 9:07 AM
This revision was automatically updated to reflect the committed changes.