This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower ArrayRef to hlfir.designate
ClosedPublic

Authored by jeanPerier on Nov 17 2022, 2:04 AM.

Details

Summary

Also add support for fir.boxchar in HLFIRTools so that character
designator with none constant lengths can be processed/converted to
fir::ExtendedValue.

Depends on D138121.

Diff Detail

Event Timeline

jeanPerier created this revision.Nov 17 2022, 2:04 AM
Herald added a project: Restricted Project. · View Herald Transcript
jeanPerier requested review of this revision.Nov 17 2022, 2:04 AM
This revision is now accepted and ready to land.Nov 17 2022, 2:08 AM
vzakhari added inline comments.Nov 17 2022, 1:09 PM
flang/lib/Lower/ConvertExprToHLFIR.cpp
63–106

Can you please use some static size for SmallVector? There is an assertion in SmallVector implementation that may kick in if size of Subsctipt type increases or if the constant limit in SmallVector is changed for whatever reason.

71

I guess you may use LoweredSubscripts here.

Remove LoweredSubscripts alias and use static size in one of
the llvm::SmallVector with bigger data type.

jeanPerier marked 2 inline comments as done.Nov 18 2022, 12:14 AM
jeanPerier added inline comments.
flang/lib/Lower/ConvertExprToHLFIR.cpp
71

Actually the alias is not really needed anymore since it is only used here, I forgot to remove it. But I updated this SmallVector to use a static size, thanks for the tip.

This revision was automatically updated to reflect the committed changes.
jeanPerier marked an inline comment as done.