================
@@ -1213,11 +1213,17 @@ static void insertSpills(const FrameDataInfo 
&FrameData, coro::Shape &Shape) {
   for (const auto &A : FrameData.Allocas) {
     AllocaInst *Alloca = A.Alloca;
     UsersToUpdate.clear();
-    for (User *U : Alloca->users()) {
+    for (User *U : make_early_inc_range(Alloca->users())) {
       auto *I = cast<Instruction>(U);
-      if (DT.dominates(Shape.CoroBegin, I))
+      // It is meaningless to retain the lifetime intrinsics refer for the
+      // member of coroutine frames and the meaningless lifetime intrinsics
+      // are possible to block further optimizations.
----------------
zmodem wrote:

I have trouble parsing this comment. It says it's "meaningless to retain the 
lifetime intrinsics" and that they may block further optimization, but isn't 
the point of #124612 that spilling allocas to the coro frame *changes* the 
lifetime of the allocas, so that the old lifetime intrinsics are *incorrect*, 
and should therefore be removed?

https://github.com/llvm/llvm-project/pull/147448
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to