[llvm] [CoroSplit] Remove lifetime marker checks for subranges of allocas (PR #152886)

Weibo He via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 9 19:47:31 PDT 2025


https://github.com/NewSigma created https://github.com/llvm/llvm-project/pull/152886

#150248 starts to drop size argument of lifetime markers. Then lifetime markers cannot refer to subrange of allocas. Maybe we should remove this check.

>From c5d6480c73f05d0caa1418cc009e432135e7f0de Mon Sep 17 00:00:00 2001
From: NewSigma <NewSigma at 163.com>
Date: Sun, 10 Aug 2025 10:25:39 +0800
Subject: [PATCH] [CoroSplit] Remove lifetime marker checks for subranges of
 allocas

---
 llvm/lib/Transforms/Coroutines/SpillUtils.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/llvm/lib/Transforms/Coroutines/SpillUtils.cpp b/llvm/lib/Transforms/Coroutines/SpillUtils.cpp
index 4e717685555b5..d5d60a320b521 100644
--- a/llvm/lib/Transforms/Coroutines/SpillUtils.cpp
+++ b/llvm/lib/Transforms/Coroutines/SpillUtils.cpp
@@ -264,11 +264,6 @@ struct AllocaUseVisitor : PtrUseVisitor<AllocaUseVisitor> {
   }
 
   void visitIntrinsicInst(IntrinsicInst &II) {
-    // When we found the lifetime markers refers to a
-    // subrange of the original alloca, ignore the lifetime
-    // markers to avoid misleading the analysis.
-    if (!IsOffsetKnown || !Offset.isZero())
-      return Base::visitIntrinsicInst(II);
     switch (II.getIntrinsicID()) {
     default:
       return Base::visitIntrinsicInst(II);



More information about the llvm-commits mailing list