This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Simplify hlfir.assign default codegen for arrays
ClosedPublic

Authored by jeanPerier on Feb 22 2023, 8:57 AM.

Details

Summary

The previous code was always emitting two genAssign calls to create
a temporary copy of the RHS if it could overlap with the LHS.

This inline temporary creation is not needed anymore after:
https://github.com/llvm/llvm-project/commit/755535b5eb5f6d60e9cc347cecd9e057231b92bb
that updated the assignment runtime to detect overlap and make a
temporary copy in the runtime directly.

Note that optimized inlined assignment will still have to do the alias
analysis to skip the copy when added later.

Diff Detail

Event Timeline

jeanPerier created this revision.Feb 22 2023, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 8:57 AM
jeanPerier requested review of this revision.Feb 22 2023, 8:57 AM
PeteSteinfeld accepted this revision.Feb 22 2023, 9:24 AM

Note that, with these changes, the function genTempFromSourceBox is not used anywhere. This causes a warning which breaks the build because we treat warnings as errors. However, just removing the function fixes things.

Once the function is removed, all builds and tests correctly and looks good.

This revision is now accepted and ready to land.Feb 22 2023, 9:24 AM

Remove genTempFromSourceBox that is now unused. Thanks Pete.