diff options
| author | Axel Cohen <axel.cohen@eshard.com> | 2021-12-20 14:49:04 +0100 |
|---|---|---|
| committer | Axel Cohen <axel.cohen@eshard.com> | 2021-12-20 14:49:04 +0100 |
| commit | 052961b0138b38a9da26e88e3db6aac19e8c070c (patch) | |
| tree | 1a92569b0e9e0b4c60a7ea04d350c88cbe813c68 /compiler/rustc_codegen_llvm/src/back/lto.rs | |
| parent | 75d1208df8f76a39135574231065e4761859b7d8 (diff) | |
| download | rust-052961b0138b38a9da26e88e3db6aac19e8c070c.tar.gz rust-052961b0138b38a9da26e88e3db6aac19e8c070c.zip | |
rustc_codegen_llvm: move should_use_new_llvm_pass_manager function to llvm_util
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/lto.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/lto.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index f6c40f1689e..27c08ba5f3c 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -3,7 +3,7 @@ use crate::back::write::{ }; use crate::llvm::archive_ro::ArchiveRO; use crate::llvm::{self, build_string, False, True}; -use crate::{LlvmCodegenBackend, ModuleLlvm}; +use crate::{llvm_util, LlvmCodegenBackend, ModuleLlvm}; use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared}; use rustc_codegen_ssa::back::symbol_export; use rustc_codegen_ssa::back::write::{ @@ -596,7 +596,10 @@ pub(crate) fn run_pass_manager( // tools/lto/LTOCodeGenerator.cpp debug!("running the pass manager"); unsafe { - if write::should_use_new_llvm_pass_manager(cgcx, config) { + if llvm_util::should_use_new_llvm_pass_manager( + &config.new_llvm_pass_manager, + &cgcx.target_arch, + ) { let opt_stage = if thin { llvm::OptStage::ThinLTO } else { llvm::OptStage::FatLTO }; let opt_level = config.opt_level.unwrap_or(config::OptLevel::No); write::optimize_with_new_llvm_pass_manager( |
