[PATCH] D89768: [Coroutine] Properly determine whether an alloca should live on the frame

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 09:13:58 PDT 2020


lxfind added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:2022
     auto Iter = LifetimeMap.find(AI);
-    for (User *U : I.users()) {
-      bool ShouldLiveOnFrame = false;
-
+    if (Iter != LifetimeMap.end()) {
       // Check against lifetime.start if the instruction has the info.
----------------
junparser wrote:
> @lxfind, with pointer tracking, I wonder whether lifetime check can be removed.
The lifetime checks may provide more accurate information in the case where allocas seem escaped. So I think it's helpful to keep it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89768/new/

https://reviews.llvm.org/D89768



More information about the llvm-commits mailing list