[fir] Add !fir.alloca conversion
authorDiana Picus <diana.picus@linaro.org>
Mon, 8 Nov 2021 10:59:48 +0000 (10:59 +0000)
committerDiana Picus <diana.picus@linaro.org>
Thu, 11 Nov 2021 11:26:33 +0000 (11:26 +0000)
commit1e6d9c06a5d20b65499b74a891a0e79cada3803e
treedab96053ae13832a5a983d98bac4ce4d60409eaa
parentbb2018261e8000828144e91ffd11153ba2a12a16
[fir] Add !fir.alloca conversion

Convert !fir.alloca into !llvm.alloca.

This also contains a fix for verifyInType in FIROps.cpp, to make sure we
can handle a !fir.ptr<!fir.array<?xN>>.

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/lib/Optimizer/CodeGen/TypeConverter.h
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/test/Fir/convert-to-llvm.fir