diff options
| author | Jean Perier <jperier@nvidia.com> | 2023-06-23 09:04:14 +0200 |
|---|---|---|
| committer | Jean Perier <jperier@nvidia.com> | 2023-06-23 09:04:25 +0200 |
| commit | 1fb0707da6e7c8a2a8981e52fb405a047c6df726 (patch) | |
| tree | 86c9f736f356ddede885854b931a26c64c4eb970 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp | |
| parent | efbb4aaacedf0ded734d0b40c42d4419d03a59ff (diff) | |
| download | llvm-1fb0707da6e7c8a2a8981e52fb405a047c6df726.zip llvm-1fb0707da6e7c8a2a8981e52fb405a047c6df726.tar.gz llvm-1fb0707da6e7c8a2a8981e52fb405a047c6df726.tar.bz2 | |
[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
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
