This is an archive of the discontinued LLVM Phabricator instance.

[flang] Handle fir.class pointer and allocatable in fir.dispatch code gen
ClosedPublic

Authored by clementval on Oct 21 2022, 1:24 AM.

Details

Summary

fir.dispatch code generation was not handling fir.class pointer and
allocatable types. Update the code generation part to rertieve correctly the
the type info from those types.

Depends on D136426

Diff Detail

Event Timeline

clementval created this revision.Oct 21 2022, 1:24 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 21 2022, 1:24 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Oct 21 2022, 1:24 AM
jeanPerier added inline comments.Oct 21 2022, 1:36 AM
flang/lib/Optimizer/CodeGen/CodeGen.cpp
907

Is this handling array passed objects (I would expect this code to unwrap a potential sequence type) ?

clementval added inline comments.Oct 21 2022, 1:41 AM
flang/lib/Optimizer/CodeGen/CodeGen.cpp
907

As per C760 pass object needs to be scalar. There is an embox with tdesc done on the caller site.

clementval added inline comments.Oct 21 2022, 1:43 AM
flang/lib/Optimizer/CodeGen/CodeGen.cpp
907

Note that this constraint is currently missing in semantics.

jeanPerier accepted this revision.Oct 21 2022, 1:53 AM
jeanPerier added inline comments.
flang/lib/Optimizer/CodeGen/CodeGen.cpp
907

OK, makes sense then, thanks for explaining

This revision is now accepted and ready to land.Oct 21 2022, 1:53 AM