[flang-commits] [PATCH] D139328: [flang] Allow conversion from hlfir.expr to fir::ExtendedValue

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Dec 5 07:28:00 PST 2022


jeanPerier created this revision.
jeanPerier added reviewers: clementval, PeteSteinfeld.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.

For now at least, the plan is to keep hlfir.expr usage limited as
sub-expression operand, assignment rhs, and a few other contexts (
e.g. Associate statements). The rest of lowering (statements lowering
in the bridge) will still expect to get and manipulate characters and
arrays in memory. That means that hlfir.expr must be converted to
variable in converter.genExprAddr/converter.genExprBox.

This is done using an hlfir.associate, and generating the related
hlfir.end_associate in the statement context.

hlfir::getFirBase of is updated to avoid bringing in the HLFIR
fir.boxchar/fir.box into FIR when the entity was created with
hlfir::AssociateOp.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139328

Files:
  flang/lib/Lower/Bridge.cpp
  flang/lib/Optimizer/Builder/HLFIRTools.cpp
  flang/test/Lower/HLFIR/calls-f77.f90
  flang/test/Lower/HLFIR/expr-addr.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139328.480102.patch
Type: text/x-patch
Size: 8274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221205/d28bf3ca/attachment-0001.bin>


More information about the flang-commits mailing list