Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ObjC] Increase depth limit to MayAutorelease #83743

Closed
wants to merge 1 commit into from

Conversation

AtariDreams
Copy link
Contributor

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

@llvmbot
Copy link
Collaborator

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.

@AtariDreams AtariDreams 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.
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.

None yet

2 participants