[Flang] Enable support for conversion of recursive record types
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 4 Jan 2022 13:43:40 +0000 (13:43 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Tue, 4 Jan 2022 13:53:58 +0000 (13:53 +0000)
commit21d299172e23a37fc251ce69dc31032a6a4a2bfe
tree05b023f782eb399ff9ff607ad57c8644014ad3b4
parent4c2aba999e54270871d5ff8f6c765e8b834dfe27
[Flang] Enable support for conversion of recursive record types

Uses the recursive type conversion implemented in D113579, D113580.
Tests check for recursive and mutually recursive types.

Note: The downstream implementation for recursive types is a bit old
and is based on a static map. This was removed while upstreaming
(https://reviews.llvm.org/D112961) based on review comments. Since
the recursive type conversion is now available in MLIR we are using
that. If this patch is accepted we can use the same in the downstream
implementation.
Part of upstreaming flang from fir-dev branch of https://github.com/flang-compiler/f18-llvm-project.

Reviewed By: ftynse

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

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/lib/Optimizer/CodeGen/TypeConverter.h
flang/test/Fir/recursive-type.fir [new file with mode: 0644]