This is an archive of the discontinued LLVM Phabricator instance.

[flang][LoopVersioning] support fir.declare
ClosedPublic

Authored by tblah on Aug 15 2023, 4:40 AM.

Details

Summary

When FIR comes from HLFIR, there will be a fir.declare operation between
the source and the usage of each source variable (and some temporary
allocations). This pass needs to be able to follow these so that it can
still transform loops when HLFIR is used, otherwise it mistakenly
assumes these values are not function arguments.

More work is needed after this patch to fully support HLFIR, because the
generated code tends to use fir.array_coor instead of fir.coordinate_of.

Diff Detail

Event Timeline

tblah created this revision.Aug 15 2023, 4:40 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 15 2023, 4:40 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
tblah requested review of this revision.Aug 15 2023, 4:40 AM
This revision is now accepted and ready to land.Aug 15 2023, 1:25 PM
vzakhari accepted this revision.Aug 15 2023, 6:09 PM

Thanks!

This revision was automatically updated to reflect the committed changes.