[llvm-branch-commits] [llvm] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)
Chuanqi Xu via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 8 01:59:04 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.
----------------
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
More information about the llvm-branch-commits
mailing list