This is an archive of the discontinued LLVM Phabricator instance.

[flang] Accept polymorphic component element in storage_size
ClosedPublic

Authored by clementval on Feb 23 2023, 7:13 AM.

Details

Summary

When an element is extracted from a polymorphic array, it is
represented as a PolymorphicValue. The PolymorphicValue is
not a boxed value but holds the original polyrmophic array
and the element itself. This was raising an error in storage_size
lowering since we expect a boxed value to take advantage of
fir.box_elesize.
This patch handles PolymorphicValue correctly.

Diff Detail

Event Timeline

clementval created this revision.Feb 23 2023, 7:13 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 23 2023, 7:13 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Feb 23 2023, 7:13 AM
PeteSteinfeld accepted this revision.Feb 23 2023, 7:33 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Feb 23 2023, 7:33 AM