This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Preserve hlfir.assign in the bufferize-hlfir pass
ClosedPublic

Authored by jeanPerier on Apr 14 2023, 1:35 AM.

Details

Summary

hlfir.assign must be rewritten in the bufferize pass since its operands,
that can be expressions, may have been updated. This is just
an operand update rewrite. The previous code was replacing the
operation, but it was dropping all hlfir.assign on the floor doing
so. This broke allocatable assignment semantics that use attributes.

Update the operands in place instead to preserve the attributes, if any.

Diff Detail

Event Timeline

jeanPerier created this revision.Apr 14 2023, 1:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 1:35 AM
jeanPerier requested review of this revision.Apr 14 2023, 1:35 AM
This revision is now accepted and ready to land.Apr 14 2023, 9:05 AM