[fir] Add fir.extract_value and fir.insert_value conversion
authorValentin Clement <clementval@gmail.com>
Fri, 5 Nov 2021 14:52:50 +0000 (15:52 +0100)
committerValentin Clement <clementval@gmail.com>
Fri, 5 Nov 2021 14:53:42 +0000 (15:53 +0100)
commitea55503d7ca5b6ded73b0fd01a8c528f68e00521
tree84e9bec9c8aacba7afdb0bb230fdf31392556d06
parentcf838ebfa5caf395979851e273b8225596b674d1
[fir] Add fir.extract_value and fir.insert_value conversion

This patch add the conversion pattern for fir.extract_value
and fir.insert_value. fir.extract_value is lowered to llvm.extractvalue
anf fir.insert_value is lowered to llvm.insertvalue.
This patch also adds the type conversion for the BoxType and RecordType
needed to have some comprehensive tests.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: awarzynski

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/lib/Optimizer/CodeGen/DescriptorModel.h [new file with mode: 0644]
flang/lib/Optimizer/CodeGen/TypeConverter.h
flang/test/Fir/convert-to-llvm.fir