[all-commits] [llvm/llvm-project] ab340f: [flang][hlfir] Support passing polymorphic expr fo...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Wed Aug 9 09:24:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab340f97f92a7f8ae5b0df02410552a86aebc295
https://github.com/llvm/llvm-project/commit/ab340f97f92a7f8ae5b0df02410552a86aebc295
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-08-09 (Wed, 09 Aug 2023)
Changed paths:
M flang/lib/Lower/ConvertCall.cpp
A flang/test/Lower/HLFIR/poly_expr_for_nonpoly_dummy.f90
Log Message:
-----------
[flang][hlfir] Support passing polymorphic expr for non-polymorphic dummy.
The actual polymorphic expression argument that is passed to a non-polymorphic
contiguous dummy has to be made a contiguous entity with the dynamic type
matching the declared type of the dummy argument.
The solution is to associate the expression with a temporary of the dynamic
type of the expression, then rebox the temporary to the declared type
of the dummy argument, and then, if necessary, make copy-in into another
temporary that is, finally, a contiguous entity with the required dynamic type.
With this change a single prepared argument may have up to two associated
clean-ups, so I had to change the clean-ups handling.
Reviewed By: tblah
Differential Revision: https://reviews.llvm.org/D157464
More information about the All-commits
mailing list