[all-commits] [llvm/llvm-project] 1fb070: [flang][hlfir] Simplify hlfir::convertToValue
jeanPerier via All-commits
all-commits at lists.llvm.org
Fri Jun 23 00:20:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1fb0707da6e7c8a2a8981e52fb405a047c6df726
https://github.com/llvm/llvm-project/commit/1fb0707da6e7c8a2a8981e52fb405a047c6df726
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-06-23 (Fri, 23 Jun 2023)
Changed paths:
M flang/lib/Optimizer/Builder/HLFIRTools.cpp
M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
M flang/test/Lower/HLFIR/calls-character-singleton-result.f90
M flang/test/Lower/HLFIR/calls-f77.f90
M flang/test/Lower/HLFIR/convert-mbox-to-value.f90
M flang/test/Lower/HLFIR/expr-as-inquired.f90
M flang/test/Lower/HLFIR/expr-value.f90
M flang/test/Lower/HLFIR/forall.f90
Log Message:
-----------
[flang][hlfir] Simplify hlfir::convertToValue
Use hlfir::loadTrivialScalars to dereference pointer, allocatables, and
load numerical and logical scalars.
This has a small fallout on tests:
- load is done on the HLFIR entity (#0 of hlfir.declare) and not the FIR one (#1). This makes no difference at the FIR level (#1 and #0 only differs to account for assumed and explicit shape lower bounds).
- loadTrivialScalars get rids of allocatable fir.box for monomoprhic scalars
(it is not needed). This exposed a bug in lowering of MERGE with
a polymorphic and a monomorphic argument: when the monomorphic is not
a fir.box, the polymorphic fir.class should not be reboxed but its
address should be read.
Reviewed By: tblah
Differential Revision: https://reviews.llvm.org/D153252
More information about the All-commits
mailing list