This is an archive of the discontinued LLVM Phabricator instance.

[flang] add ExtendedValue type helpers and factory::genZeroValue
ClosedPublic

Authored by jeanPerier on Feb 2 2022, 7:48 AM.

Details

Summary

Add some helpers to get the base type and element type of
fir::ExtendedValue and to test if a fir::ExtendedValue is
a derived type with length parameters.

Add a new helper factory::genZeroValue to generate zero scalar value for
all the numerical types and false for logicals.

These helpers are used only in lowering for now, so add unit tests.

Diff Detail

Event Timeline

jeanPerier created this revision.Feb 2 2022, 7:48 AM
jeanPerier requested review of this revision.Feb 2 2022, 7:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 7:48 AM
schweitz accepted this revision.Feb 2 2022, 12:13 PM
This revision is now accepted and ready to land.Feb 2 2022, 12:13 PM