This is an archive of the discontinued LLVM Phabricator instance.

[Coroutine] Properly use lifetime intrinsics to analyze allocas
AbandonedPublic

Authored by lxfind on Feb 11 2021, 5:37 PM.

Details

Summary

In this patch, we traverse from each lifetime.start intrinsics, follow the control flow. If we never reach a coro.suspend before reaching a lifetime.end intrinsic for the same alloca, we can safely assume that the alloca
will not live across suspension points. This should still achieve similar effect as before but is precise and correct.
Added a test case.

Diff Detail