This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower storage_size intrinsic for polymorphic entities
ClosedPublic

Authored by clementval on Jan 30 2023, 7:18 AM.

Details

Summary

Lower STOARGE_SIZE intrinsic when the argument is polymoprhic
or unlimited polymorphic. STOARGE_SIZE for monomorphic entity is folded
by the frontend.

Diff Detail

Event Timeline

clementval created this revision.Jan 30 2023, 7:18 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
clementval requested review of this revision.Jan 30 2023, 7:18 AM
vdonaldson accepted this revision.Jan 30 2023, 10:22 AM
This revision is now accepted and ready to land.Jan 30 2023, 10:22 AM

nit: typo in description: STOARGE_SIZE

flang/lib/Lower/IntrinsicCall.cpp
4831

Is it legal to dereference args[1] if we allow args.size() to be 1 at line 4801?

clementval added inline comments.Jan 30 2023, 11:45 AM
flang/lib/Lower/IntrinsicCall.cpp
4831

Good catch it should be isStaticallyAbsent(args, 1);

update hanlding of optional kind

vzakhari accepted this revision.Jan 30 2023, 12:18 PM

Thanks!