[flang][hlfir] lower hlfir.shape_of
authorTom Eccles <tom.eccles@arm.com>
Fri, 17 Mar 2023 15:49:22 +0000 (15:49 +0000)
committerTom Eccles <tom.eccles@arm.com>
Mon, 17 Apr 2023 13:25:54 +0000 (13:25 +0000)
commit683a6e1c9e5396f64086c07bec334a38acd0ec7a
treef986c96045ee93cf8e9771c738b3854dfb4d967d
parent5ab5cdc1e00e90865fb9907fe8d3a1e0fe3972c8
[flang][hlfir] lower hlfir.shape_of

If possible the shape is gotten from the bufferization of the expr
argument.

The simple cases should already have been resolved during lowering. This
is mostly intended for cases where shape information is added in between
lowering and the end of bufferization (for example transformational
intrinsics with assumed shape arguments).

Depends on: D146832

Differential Revision: https://reviews.llvm.org/D146833
flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
flang/test/HLFIR/shapeof-lowering.fir [new file with mode: 0644]