[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)
Akira Hatanaka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 22:07:30 PDT 2024
================
@@ -588,12 +588,6 @@ bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses,
// this also adds codegenerator level optimization passes.
CodeGenFileType CGFT = getCodeGenFileType(Action);
- // Add ObjC ARC final-cleanup optimizations. This is done as part of the
----------------
ahatanak wrote:
The intrinsic calls are needed to prevent ARC optimizer from moving releases to an earlier point that can cause objects to be deallocated prematurely. clang doesn't emit the intrinsic calls if `OptimizationLevel` is zero.
https://github.com/llvm/llvm-project/pull/101114
More information about the llvm-commits
mailing list