diff options
| author | bors <bors@rust-lang.org> | 2022-03-10 08:56:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-10 08:56:02 +0000 |
| commit | 282778aee26166754315815552bae454fc968960 (patch) | |
| tree | 5bb006c5931060ae0d783e0a88631c126d003f4f /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | d7b282b886472413a26ef22c848eda0499d12cd3 (diff) | |
| parent | 6c58b5e1ab8c999f7dc64b30b07867ae1b0d3b4c (diff) | |
| download | rust-282778aee26166754315815552bae454fc968960.tar.gz rust-282778aee26166754315815552bae454fc968960.zip | |
Auto merge of #94764 - nikic:update-llvm-3, r=nagisa
Update LLVM submodule This merges upstream changes from the 14.x release branch. Fixes #89609. Fixes #93923. Fixes #94032.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index e9d13a4ebaf..4b324740a1f 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -527,8 +527,9 @@ pub(crate) fn should_use_new_llvm_pass_manager(user_opt: &Option<bool>, target_a // The new pass manager is enabled by default for LLVM >= 13. // This matches Clang, which also enables it since Clang 13. - // FIXME: There are some perf issues with the new pass manager - // when targeting s390x, so it is temporarily disabled for that - // arch, see https://github.com/rust-lang/rust/issues/89609 - user_opt.unwrap_or_else(|| target_arch != "s390x" && llvm_util::get_version() >= (13, 0, 0)) + // There are some perf issues with the new pass manager when targeting + // s390x with LLVM 13, so enable the new pass manager only with LLVM 14. + // See https://github.com/rust-lang/rust/issues/89609. + let min_version = if target_arch == "s390x" { 14 } else { 13 }; + user_opt.unwrap_or_else(|| llvm_util::get_version() >= (min_version, 0, 0)) } |
