[flang][hlfir] get extents from hlfir.shape_of
authorTom Eccles <tom.eccles@arm.com>
Thu, 2 Mar 2023 15:52:20 +0000 (15:52 +0000)
committerTom Eccles <tom.eccles@arm.com>
Mon, 17 Apr 2023 13:25:54 +0000 (13:25 +0000)
commit5ab5cdc1e00e90865fb9907fe8d3a1e0fe3972c8
treebde611951a909b408f323c3770af4989b19440b7
parent08b09d79b129d98c79fd9827e80b147582f2f900
[flang][hlfir] get extents from hlfir.shape_of

If the extents were known, this should have been canonicalised into a
fir.shape operation. Therefore, the extents at this point are not known at
compile time. Use hlfir.get_extents to delay resolving the real extent
until after the expression is bufferized.

Depends On: D146831

Differential Revision: https://reviews.llvm.org/D146832
flang/lib/Optimizer/Builder/HLFIRTools.cpp
flang/test/HLFIR/extents-of-shape-of.f90 [new file with mode: 0644]