[all-commits] [llvm/llvm-project] 788960: [flang] Allow conversion from hlfir.expr to fir::E...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Dec 6 04:53:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 788960d6286325c59d1e8e8e85743dafd4a61476
      https://github.com/llvm/llvm-project/commit/788960d6286325c59d1e8e8e85743dafd4a61476
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

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

  Log Message:
  -----------
  [flang] Allow conversion from hlfir.expr to fir::ExtendedValue

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.

Differential Revision: https://reviews.llvm.org/D139328




More information about the All-commits mailing list