[all-commits] [llvm/llvm-project] 6c3c81: [flang] Lower and code gen for allocate on polymor...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Fri Oct 21 05:34:18 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c3c81b983edf8bf1299011b530edbc4d32285cf
https://github.com/llvm/llvm-project/commit/6c3c81b983edf8bf1299011b530edbc4d32285cf
Author: Valentin Clement <clementval at gmail.com>
Date: 2022-10-21 (Fri, 21 Oct 2022)
Changed paths:
M flang/docs/PolymorphicEntities.md
M flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h
M flang/lib/Lower/Allocatable.cpp
M flang/lib/Optimizer/CodeGen/CodeGen.cpp
M flang/lib/Optimizer/CodeGen/TypeConverter.h
A flang/test/Lower/allocatable-polymorphic.f90
Log Message:
-----------
[flang] Lower and code gen for allocate on polymorphic entities
When allocating a polymorphic entity, its type descriptor can come
from the declared type or can be provided in the allocate statement.
This patch adds lowering for allocate on polymorphic by calling
the `AllocatableInitDerived` runtime function with the correct
type descriptor. Some adaptation are made in the code generation
to accept fir.class where it is appropriate.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D136426
More information about the All-commits
mailing list