[llvm-branch-commits] [llvm] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 8 01:52:30 PDT 2025
================
@@ -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
More information about the llvm-branch-commits
mailing list