[flang-commits] [PATCH] D149970: [flang][hlfir] Add TODO for polymorphic vector subscripted entities
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Sun May 7 07:26:56 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2a9126d40dfb: [flang][hlfir] Add TODO for polymorphic vector subscripted entities (authored by jeanPerier).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149970/new/
https://reviews.llvm.org/D149970
Files:
flang/lib/Lower/ConvertExprToHLFIR.cpp
Index: flang/lib/Lower/ConvertExprToHLFIR.cpp
===================================================================
--- flang/lib/Lower/ConvertExprToHLFIR.cpp
+++ flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -729,6 +729,11 @@
llvm::ArrayRef<mlir::Value> resultExtents) {
fir::FirOpBuilder &builder = getBuilder();
mlir::Value shape = builder.genShape(loc, resultExtents);
+ // For polymorphic entities, it will be needed to add a mold on the
+ // hlfir.elemental_addr/hlfir.elemental so that we are able to create
+ // temporary storage for it.
+ if (partInfo.base && partInfo.base->isPolymorphic())
+ TODO(loc, "vector subscripted polymorphic entity in HLFIR");
// The type parameters to be added on the hlfir.elemental_addr are the ones
// of the whole designator (not the ones of the vector subscripted part).
// These are not yet known and will be added when finalizing the designator
@@ -1365,6 +1370,11 @@
// Elemental expression.
mlir::Type elementType;
if constexpr (R::category == Fortran::common::TypeCategory::Derived) {
+ // TODO: need to pass a mold to hlfir.elemental for polymorphic arrays
+ // if using hlfir.elemental here so that it can get the dynamic type
+ // info.
+ if (left.isPolymorphic())
+ TODO(loc, "parenthesized polymorphic arrays in HLFIR");
elementType = Fortran::lower::translateDerivedTypeToFIRType(
getConverter(), op.derived().GetType().GetDerivedTypeSpec());
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149970.520187.patch
Type: text/x-patch
Size: 1514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230507/c15156ae/attachment.bin>
More information about the flang-commits
mailing list