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

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 9 19:48:05 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-coroutines

Author: Weibo He (NewSigma)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/152886.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Coroutines/SpillUtils.cpp (-5) 


``````````diff
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);

``````````

</details>


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


More information about the llvm-commits mailing list