[all-commits] [llvm/llvm-project] c099ca: [flang][optimizer] support aggregate types inside ...
jeanPerier via All-commits
all-commits at lists.llvm.org
Wed Feb 2 00:30:05 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c099ca4e45dbccd58dfa1964fa1f304c6055958d
https://github.com/llvm/llvm-project/commit/c099ca4e45dbccd58dfa1964fa1f304c6055958d
Author: Jean Perier <jperier at nvidia.com>
Date: 2022-02-02 (Wed, 02 Feb 2022)
Changed paths:
M flang/lib/Optimizer/CodeGen/TypeConverter.h
M flang/lib/Optimizer/Dialect/FIRType.cpp
M flang/test/Fir/types-to-llvm.fir
Log Message:
-----------
[flang][optimizer] support aggregate types inside tuple and record type
This patch allows:
- fir.box type to be a member of tuple<> or fir.type<> types,
- tuple<> type to be a member of tuple<> type.
When a fir.box types are nested in tuple<> or fir.type<>, it is translated
to the struct type of a Fortran runtime descriptor, and not a
pointer to a descriptor. This is because the fir.box is owned by the tuple
or fir.type.
FIR type translation was also flattening nested tuple while lowering to LLVM
dialect types. There does not seem to be a deep reason for doing that
and doing it causes issues in fir.coordinate_of generated on such tuple
(a fir.coordinate_of getting tuple<B, C> in tuple<A, tuple<B, C>>
ended-up lowered to an LLVM GEP getting B).
Differential Revision: https://reviews.llvm.org/D118701
More information about the All-commits
mailing list