This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use fir.type_desc and delay type desc address resolution
ClosedPublic

Authored by clementval on Jan 30 2023, 11:20 AM.

Details

Summary

Makes use of fir.type_desc in order to delay the type desc address
resolution. The lowering inserts fir.type_desc operation instead of fir.addr_of
operation pointing to the fir.global type descriptor. The fir.type_desc
operation is then lowered in code gen to an address of operation in the LLVM
dialect. At this stage, the type descriptor is generated in all cases.

Diff Detail

Event Timeline

clementval created this revision.Jan 30 2023, 11:20 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
clementval requested review of this revision.Jan 30 2023, 11:20 AM
vdonaldson accepted this revision.Jan 31 2023, 10:47 AM
vdonaldson added inline comments.
flang/lib/Lower/Allocatable.cpp
674

We need this for name mangling extensions too :)

This revision is now accepted and ready to land.Jan 31 2023, 10:47 AM
flang/lib/Optimizer/Dialect/FIROps.cpp