diff options
author | Nuri Amari <nuri.amari99@gmail.com> | 2024-05-23 10:04:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 10:04:55 -0700 |
commit | 8cc8e5d6c6ac9bfc888f3449f7e424678deae8c2 (patch) | |
tree | 3837d9b2c366b691e7b17665ec51f456c5ddf69b /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 910292c3ac2ebe43cdbc90223c6c9702128316db (diff) | |
download | llvm-8cc8e5d6c6ac9bfc888f3449f7e424678deae8c2.zip llvm-8cc8e5d6c6ac9bfc888f3449f7e424678deae8c2.tar.gz llvm-8cc8e5d6c6ac9bfc888f3449f7e424678deae8c2.tar.bz2 |
Run ObjCContractPass in Default Codegen Pipeline (#92331)
Prior to this patch, when using -fthinlto-index= the ObjCARCContractPass isn't run prior to CodeGen, and instruction selection fails on IR containing arc intrinsics. This patch is motivated by that usecase.
The pass was previously added in various places codegen is performed. This patch adds the pass to the default codegen pipepline, makes sure it bails immediately if no arc intrinsics are found, and removes the adhoc scheduling of the pass.
Co-authored-by: Nuri Amari <nuriamari@fb.com>
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 90985c0..1f77809 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -587,12 +587,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 - // "codegen" passes so that it isn't run multiple times when there is - // inlining happening. - if (CodeGenOpts.OptimizationLevel > 0) - CodeGenPasses.add(createObjCARCContractPass()); - if (TM->addPassesToEmitFile(CodeGenPasses, OS, DwoOS, CGFT, /*DisableVerify=*/!CodeGenOpts.VerifyModule)) { Diags.Report(diag::err_fe_unable_to_interface_with_target); |