This is an archive of the discontinued LLVM Phabricator instance.

Reapply x2: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas
AbandonedPublic

Authored by nickdesaulniers on Sep 11 2023, 10:50 AM.

Details

Reviewers
None
Summary

This reverts commit b7f4915644844fb9f32e8763922a070f5fe4fd29.

These temporaries are only used in the callee, and their memory can be
reused after the call is complete.

rdar://58552124

Original Author: Erik Pilkington <erik.pilkington@gmail.com>

The second time this landed, it had a bug where the lifetimes of
references to the temporaries was cut short prematurely. For now, skip
emitting the lifetime annotations if the callee returns a reference. We
can probably do better than this.

Link: https://github.com/llvm/llvm-project/issues/38157
Link: https://github.com/llvm/llvm-project/issues/41896
Link: https://github.com/llvm/llvm-project/issues/43598
Link: https://github.com/ClangBuiltLinux/linux/issues/39
Link: https://reviews.llvm.org/rGfafc6e4fdf3673dcf557d6c8ae0c0a4bb3184402

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2023, 10:50 AM
Herald added a subscriber: jvesely. · View Herald Transcript
nickdesaulniers requested review of this revision.Sep 11 2023, 10:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2023, 10:50 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
nickdesaulniers abandoned this revision.Sep 11 2023, 10:51 AM

meant to update another thread

  • update commit description
nickdesaulniers abandoned this revision.Sep 11 2023, 10:52 AM

I hate arcanist!