This is an archive of the discontinued LLVM Phabricator instance.

[flang] Embox derived-type directly to fir.class without fir.convert
ClosedPublic

Authored by clementval on Oct 12 2022, 9:49 AM.

Details

Summary

non-polymorphic derived-type can call type-bound procedure with passed-object.
In that case, the derived-type is emboxed in order to be passed to the call.
Until now the emboxing was done to a fir.box followed by a fir.convert.
This patch update the createBox function so that we can directly embox to
a fir.class and avoid the extra fir.convert.

Diff Detail

Event Timeline

clementval created this revision.Oct 12 2022, 9:49 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 12 2022, 9:49 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Oct 12 2022, 9:49 AM
PeteSteinfeld accepted this revision.Oct 12 2022, 1:07 PM

All builds and tests correctly and looks good to me!

This revision is now accepted and ready to land.Oct 12 2022, 1:07 PM