[llvm] [ObjCARC] Improve empty autorelease pool elimination in OptimizeAutoreleasePools (PR #200310)

Akira Hatanaka via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 19:10:29 PDT 2026


ahatanak wrote:

The commit message explains what the change does, but not why. Could you add the motivation?

The key point is that clearing the stack on a mismatch is deliberately conservative. It can only suppress an elimination, but never causes a wrong one. The front-end should never generate something like this, but bailing out is still the right thing to do as we don't want to mis-compile by reasoning about an untrustworthy stack.

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


More information about the llvm-commits mailing list