This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Fixed finalization in hlfir.assign codegen.
ClosedPublic

Authored by vzakhari on Jul 18 2023, 5:44 PM.

Details

Summary

When hlfir.assign is lowered into simple load/store,
we may still need to finalize the LHS.
The patch passes needFinalization to genScalarAssignment
for LHS of any derived type, so some Destroy calls
might be redundant. They can be removed later by propagating/deducing
IsFinalizable information about the LHS type.

Diff Detail

Event Timeline

vzakhari created this revision.Jul 18 2023, 5:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 5:44 PM
vzakhari requested review of this revision.Jul 18 2023, 5:44 PM
This revision is now accepted and ready to land.Jul 19 2023, 8:55 AM
This revision was landed with ongoing or failed builds.Jul 19 2023, 2:38 PM
This revision was automatically updated to reflect the committed changes.