[llvm] [ObjC] Increase depth limit to MayAutorelease to 16 (PR #83743)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 13:40:40 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: AtariDreams (AtariDreams)
<details>
<summary>Changes</summary>
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
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/83743
More information about the llvm-commits
mailing list