Skip to content

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Mar 3, 2024

This should be more than large enough to cover pretty much any possible sane situation and case.

@llvmbot
Copy link
Member

llvmbot commented Mar 3, 2024

@llvm/pr-subscribers-llvm-transforms

Author: AtariDreams (AtariDreams)

Changes

This should be more than large enough to cover pretty much any possible sane situation and case.


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

1 Files Affected:

  • (modified) llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp (+1-1)
diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
index dceb2ebb1863e7..9b94faff2308e7 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
@@ -51,7 +51,7 @@ bool MayAutorelease(const CallBase &CB, unsigned Depth = 0) {
         if (const CallBase *JCB = dyn_cast<CallBase>(&I))
           // This recursion depth limit is arbitrary. It's just great
           // enough to cover known interesting testcases.
-          if (Depth < 3 && !JCB->onlyReadsMemory() &&
+          if (Depth < 16 && !JCB->onlyReadsMemory() &&
               MayAutorelease(*JCB, Depth + 1))
             return true;
     }

Copy link

github-actions bot commented Mar 3, 2024

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@AZero13 AZero13 changed the title [ObjC] Increase depth limit to MayAutorelease to 16 [ObjC] Increase depth limit to MayAutorelease Mar 3, 2024
This should be more than large enough to cover pretty much any possible sane situation and case.
@AZero13 AZero13 closed this Mar 16, 2024
@AZero13 AZero13 deleted the depth branch March 16, 2024 01:59
@AZero13 AZero13 restored the depth branch March 10, 2025 17:17
@AZero13 AZero13 reopened this Mar 10, 2025
@AZero13 AZero13 closed this Jun 22, 2025
@AZero13 AZero13 deleted the depth branch June 22, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants