================
@@ -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.
----------------
ChuanqiXu9 wrote:

I feel the point is, the lifetime intrinsics are for allocas. And when we move 
them into the frame, the original lifetime intrinsics are naturally 
meaningless. To me, I feel it is meaningless to talk about whether or not the 
undefined intrinsics are correct or not.

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